![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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) |
| | 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 | |
| |
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 | |||