Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - How to find service assembly ???

 
 
Old 06-20-2007   #1 (permalink)
Hiten


 
 

How to find service assembly ???

Hi,

I have to use custom UserNameValidator in my service and I have multiple
services being hosted in one virtual folder.

e.g. IIS virtual Folder:

MyServices

service1.svc
service2.svc
service3.svc

Each service would perform its own work, web.config would contain definition
about each services. To provide custom validator for each service, I am
thinking of defining a common Behavior that I will apply to each service.
Validator would use DB connection to validate user, I have the information
about the db in each serialized file for each service.

Now question is, when the validator is called, how do I find which service
is calling the validator? Is there a way to reflect the domain or anything in
IIS hosted service to find which service is being called so that I can
reflect on the service assembly and deserialize the information stored in
seperate file?

Please suggest

Thanks in advance



My System SpecsSystem Spec
Old 07-03-2007   #2 (permalink)
Naraendirakumar R.R.


 
 

Re: How to find service assembly ???

Depending on how you structure your code, you should be able to use
Assembly.GetCallingAssembly() to figure out which assembly called your
validator.
http://msdn2.microsoft.com/en-us/lib...gassembly.aspx

BTW: In case you can get away with not reinventing the wheel. The patterns
& practices group at Microsoft have published bits along with source code,
to solve the same problem you are alluding to.
It is called the Enterprise Library 3.1
http://www.microsoft.com/downloads/d...DisplayLang=en


"Hiten" <Hiten@discussions.microsoft.com> wrote in message
news:219F4BFB-6AD8-4252-A51D-73B826999CB0@microsoft.com...
> Hi,
>
> I have to use custom UserNameValidator in my service and I have multiple
> services being hosted in one virtual folder.
>
> e.g. IIS virtual Folder:
>
> MyServices
>
> service1.svc
> service2.svc
> service3.svc
>
> Each service would perform its own work, web.config would contain
> definition
> about each services. To provide custom validator for each service, I am
> thinking of defining a common Behavior that I will apply to each service.
> Validator would use DB connection to validate user, I have the information
> about the db in each serialized file for each service.
>
> Now question is, when the validator is called, how do I find which service
> is calling the validator? Is there a way to reflect the domain or anything
> in
> IIS hosted service to find which service is being called so that I can
> reflect on the service assembly and deserialize the information stored in
> seperate file?
>
> Please suggest
>
> Thanks in advance
>
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
COM "Unable to find assembly " .NET General
Given an C#.NET assembly, what information can you find out? .NET General
Unable to find type [Drawing.Image]: make sure that the assembly containing this type is loaded PowerShell
Can't find a service to disable it Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46