I recently got a question concerning ISAPI using managed assemblies.
First of all I developed an isapi extension that was a simple one. It was working properly. I then add referneces to some managed dlls in it and copied them into windows\system32\inetsvr folder and it still worked. But when i deployed it on other machines, it give me an error that file not found. I removed the wildcard mapping of that isapi extension from my system and then re-add it after restarting the iis and now it gives me the same error. if i used it without any reference, it works fine but with references it gives me the error. with references, i am still able to debug it and it goes well.
if im missing something them do let me know.
thanx in advance
Since the plain ISAPI works just fine, I think you are hitting a couple different user misconfiguration issues that cause the "File not found" response to be sent.
- All Application Mappings have a "Check if File Exists" option. This should be checked by default and should not be changed unless you know why you want it unchecked. One such reason would be if your Mapping is changing the URL-to-Physical behavior to be different than standard conventions (i.e. for each URL, you are accessing resources in a database instead of the filesystem). For Wildcard Mappings, this should usually be unchecked.
- .NET Assembly DLLs load according to several ordered rules. See the following URLs for more info: http://msdn.microsoft.com/msdnmag/issues/03/10/BasicInstincts/default.aspx , http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptutorials/html/assembly_binding_log_viewer_deployment.asp
Thus, my guess is that you either:
- Have "Check if file exists" checked for your Wildcard application mappings on IIS6. Simply removing and re-adding application mappings should not be problematic unless you failed to add them identically.
- Failed to deploy your managed assemblies correctly with your native ISAPI DLL. If your managed assemblies are GAC'd on your machine but not on the other machine, that could be a reason. Adding references inside of Visual Studio has no relevance on the resolution of the assembly at runtime.
Now, you can use FileMon from www.sysinternals.com and see what file is "not found" and make sure it is there. But, I would suggest that you first spend time figuring out how to correctly deploy your application (i.e. read the above URLs for how to deploy and troubleshoot assembly DLLs) instead of using this pragmatic approach because it only solves the problem, not necessarily correctly.