IIS 5 & IIS 6
ASP.NET 2 Web Service on Windows Server 2003
Last post Sep 16, 2008 06:05 AM by HeadTrap
Sep 11, 2008 11:10 AM|HeadTrap|LINK
I have created a web service in Visual Studio 2005 using C#, that reads and writes to Centera. It works perfectly when I run it from VS on my XP machine. However, when I publish it and upload it to wwwroot on my dev server I am receiving an error of '10027
- Cant open output file'. I have been on Centera forums about this and have been told that the problem is most likely permissions but I have granted all permissions that the application can possibly have.
Does anybody please have any ideas as to how I can overcome this please!?
Sep 11, 2008 02:56 PM|Paul Lynch|LINK
Just so that we are clear about this - are you saying that you have a .Net app running on IIS 6.0 which reads from and writes to a UNC path share ? Is this right ?
If so then you need to ensure that the process ID under which your code is running has the necessary permissions to access the UNC path.
If you are impersonating your users and delegating their credentials then you will need to configure Kerberos authentication in your environment.
Sep 12, 2008 03:51 AM|HeadTrap|LINK
Thank you for your reply. Yes I my .NET app is on IIS 6 reading and writing to a UNC path share. Please excuse my ignorence, but how do I go about giving permissions to the process ID?
Sep 12, 2008 04:19 AM|mukhtard|LINK
I would do something like the following on your remote machine which is acting as the UNC share:
net share myshare=x:\mywebservice\data /grant:webserviceID,FULL //creates share
icacls x:\mywebservice\data /reset // reset permission
icacls x:\mywebservice\data /grant webserviceID:(OI)(CI)(F) // set permission
IIS Performance Team
Sep 12, 2008 05:37 AM|HeadTrap|LINK
Thank your for your reply. I'm still stuck with this, sorry. I have used ProcessMonitor to establish what directories require permissions. The process being used is 'w3wp.exe' with a PID of 7260. Is it this process that I need to grant permissions to and
if so how do I do this please?
Sep 12, 2008 06:01 AM|Paul Lynch|LINK
If you open Task Manager on your machine and then on the Processes tab click View | Select Columns and then click PID you should be able to see which user identity owns the w3wp.exe process.
If this is in a domain then you might want to run your application pool as a domain user account and then grant the relevant permissions to that domain account.
Sep 13, 2008 11:01 AM|HeadTrap|LINK
I thought I had solved this issue as I have created a seperate app pool for this web service and assigned the identity as 'Local System'. When I then tried the web service it actually worked first time! However, each time I try it, it will work first time
and then will not work again after that whilst the current browser in open. Am I doing something wrong here?
Sep 13, 2008 07:57 PM|murtaza_t|LINK
Try these steps:
1. Create a user IWPD_myshare on both the machines with exactly the same password. And add it to the IIS_WPG group.
2. Go to properties to of your dedicated application pool and select the Identity tab. Select configurable option and add the user IWPD_myshare and its password.
3. Make sure that you have assigned the application pool to your website and have also assigned permissions to IWPD_myshare on your site.
4. Go on the server that has the UNC share and assign permissions to IWPD_myshare (assuming that you have also created it on both the machine).
This is it.. you should be able to access the UNC share now.
Sep 15, 2008 11:36 AM|tomkmvp|LINK
See also ...
Sep 16, 2008 06:05 AM|HeadTrap|LINK
Thank you so much for all of your replies, they were very helpful. However, I have now resolved the issue as I was making an extra call to the Centera API that was not needed and would cause this issue. I had not noticed as I was so close to the code.