Hi all. This may seem like an ASP.NET specific question but I do not think so, so I apologise if it is.
I have a classic ASP site (I did NOT develop this). This runs fine on IIS6 on WS2003.
There is a COM component that was developed by someone many years ago in VB6. There is a function in there called "GetCertFile". You give it a folder path (UNC network path) and it deals with it and gives you back a filename. That works just fine.
I now have developed a new website. ASP.NET 4.0, running on IIS7.5. This is a seperate physical server than the one which has the classic ASP site.
COM Component is registered - so this is not a problem.
This new site uses the SAME functionality in terms of calling the GetCertFile. Feeding it the SAME UNC path and this results in an empty string being given back. This makes no sense.
When I look at the Last Win32 error, I get error code 3 which is File not found.
Now here is something interesting....
If I dev a simple winforms .NET 4.0 app and do the same as above, I get the filename back no problem (just like the behavior on the classic ASP site).
I am COMPLETELY stumped - I have no idea why I am getting such a different behavior.
I am convinced this is down to configuration of IIS or something.
The old site does use forms authentication (ASP.NET to asp hand off) where as the new website is pure ASP.NET and does also have forms authentication.
Here is where it gets even more interesting:
If I create a new ASP.NET project and use the same code as above and having it run on the local dev IIS (cassini), it works fine! No problem!
But when I create a virtual directory and have the test website run from this (making sure I enable 32bit app on the app pool since the COM component is 32 bit and the website is 64bit), then it does NOT work.
What am I missing? Can anyone shed some light on this? I really need to get this to work but this makes no sense why I am getting such a different behavior.
There are no errors or warning in the eventlogs. So I am lost. I do think its an IIS / app pool thing somewhere but again, not sure and I need experts like yourselves to aid me here.
Thanks!