![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 Specs![]() |
| | #2 (permalink) |
| Guest | 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 Specs![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Given an C#.NET assembly, what information can you find out? | Curious | .NET General | 0 | 07-28-2008 12:18 PM |
| Unable to find type [Drawing.Image]: make sure that the assembly containing this type is loaded | IT Staff | PowerShell | 4 | 08-16-2007 08:55 PM |
| Can't find a service to disable it | DavidH | Vista General | 2 | 06-09-2007 09:04 PM |
| 5308-64: KDC service - can't find file? | Vista Tester | Vista General | 2 | 04-03-2006 10:58 AM |