Execution w/ WebServices
-
Hey i'm trying to execute a program that is basically located in "C:\EXEFolder" and i'm trying to make a Web Service w/VB.NET to execute that program (inside one of the Web Service's WebMethods) I've tried creating a New System.Diagnostics.Process() and then calling it's Start method, but all i get is an ERROR# 5: Access denied. Obviously it's a permissions thing but I cant figure out what i holding me back from it. I've tried setting the ASPNET User to Full Control on the file but to no avail. Any advice, please? p.s. if i'm in the wrong forum... tell me where to go!!! ~Timothy T. Rymer
-
Hey i'm trying to execute a program that is basically located in "C:\EXEFolder" and i'm trying to make a Web Service w/VB.NET to execute that program (inside one of the Web Service's WebMethods) I've tried creating a New System.Diagnostics.Process() and then calling it's Start method, but all i get is an ERROR# 5: Access denied. Obviously it's a permissions thing but I cant figure out what i holding me back from it. I've tried setting the ASPNET User to Full Control on the file but to no avail. Any advice, please? p.s. if i'm in the wrong forum... tell me where to go!!! ~Timothy T. Rymer
You might try grabbing the User Credentials in the web service and see exactly which account is trying to execute the program, it may be different from ASPNET. It is worth a look. Rocky Moore <><
-
You might try grabbing the User Credentials in the web service and see exactly which account is trying to execute the program, it may be different from ASPNET. It is worth a look. Rocky Moore <><
that is true.. but i'm not exactly sure where to look truthfully. i'm running around with my head cut off, because i've given up on the WebService, and just wrote a ActiveX DLL in VB6 to work in ASP - it worked when i ran the webpage on the local machine, but not when i called it from another website. I did set specifically IUSR_ServerName and ASPNET Users to Full Control. Let me explain exactly what i'm doing just for the heck of it: *I have created a ActiveX DLL, which has a function to create a mailbox using Vircom's VOP Mail (location: 'c:\vopmail') *When calling CreateEmail('email', 'alias', 'password'), I call the Shell() command which calls a batch file located in 'c:\program files\webservice' *this batch file basically has 3 command lines: 'c:\vopmail\mailbox.exe -create %1' 'c:\vopmail\mailalias.exe %1 %2' 'c:\vopmail\mailbox.exe -pass %1 %3' i've set IUSR_ServerName and ASPNET to full control on both of those folders and full control on the mailbox and mailalias EXE's. any other advise? because the shell() command returns with a return value and nothing is crashing as far as syntax errors in asp go. *sigh* so i'm kinda depressed about the whole thing because i'm not that great (obviously) with permissions. Thanks in advance if you can help me ~Timothy T. Rymer
-
that is true.. but i'm not exactly sure where to look truthfully. i'm running around with my head cut off, because i've given up on the WebService, and just wrote a ActiveX DLL in VB6 to work in ASP - it worked when i ran the webpage on the local machine, but not when i called it from another website. I did set specifically IUSR_ServerName and ASPNET Users to Full Control. Let me explain exactly what i'm doing just for the heck of it: *I have created a ActiveX DLL, which has a function to create a mailbox using Vircom's VOP Mail (location: 'c:\vopmail') *When calling CreateEmail('email', 'alias', 'password'), I call the Shell() command which calls a batch file located in 'c:\program files\webservice' *this batch file basically has 3 command lines: 'c:\vopmail\mailbox.exe -create %1' 'c:\vopmail\mailalias.exe %1 %2' 'c:\vopmail\mailbox.exe -pass %1 %3' i've set IUSR_ServerName and ASPNET to full control on both of those folders and full control on the mailbox and mailalias EXE's. any other advise? because the shell() command returns with a return value and nothing is crashing as far as syntax errors in asp go. *sigh* so i'm kinda depressed about the whole thing because i'm not that great (obviously) with permissions. Thanks in advance if you can help me ~Timothy T. Rymer
When I had some problems using authentication in web services I used this simple web method to see exactly what credentials were being used:
[WebMethod]
public string TestMethod()
{
string r="WID:"+WindowsIdentity.GetCurrent().Name+"\r\n";
r=r+"WType:"+WindowsIdentity.GetCurrent().AuthenticationType+"\r\n";
r=r+"AUTH:"+WindowsIdentity.GetCurrent().IsAuthenticated.ToString()+"\r\n";
return(r);
}As you can see, it simply builds a string and returns it from the web service. You can of course just pump to to a debug long or set a break at that point. The very first step I ever use to determine if I even have an authentication problem, is to give the directory that I will use (or whereeve) the user Everyone and assign full permissions. If it still do not work, it usually is some other kind of problem. Rocky Moore <><
-
When I had some problems using authentication in web services I used this simple web method to see exactly what credentials were being used:
[WebMethod]
public string TestMethod()
{
string r="WID:"+WindowsIdentity.GetCurrent().Name+"\r\n";
r=r+"WType:"+WindowsIdentity.GetCurrent().AuthenticationType+"\r\n";
r=r+"AUTH:"+WindowsIdentity.GetCurrent().IsAuthenticated.ToString()+"\r\n";
return(r);
}As you can see, it simply builds a string and returns it from the web service. You can of course just pump to to a debug long or set a break at that point. The very first step I ever use to determine if I even have an authentication problem, is to give the directory that I will use (or whereeve) the user Everyone and assign full permissions. If it still do not work, it usually is some other kind of problem. Rocky Moore <><