it's a question abuot vs2005 default web server and the iis web server between.

it's a question abuot vs2005 default web server and the iis web server between.

Post by topgen » Sun, 09 Jul 2006 19:23:58


question describe:

i used C# write the follow method:
--------------------------------------------------------------------------------
public static void GetMp3FileFromAudio(string ExeFilePath,string
AudioFilePath, string SaveFilePath)
{
System.Diagnostics.ProcessStartInfo ps = new
System.Diagnostics.ProcessStartInfo(ExeFilePath);
ps.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Hidden;
ps.Arguments = "-i " + AudioFilePath.Replace(@"\\", @"\") +
" " + SaveFilePath.Replace(@"\\", @"\");
System.Diagnostics.Process.Start(ps);
}
---------------------------------------------------------------
it's worked normal in the vs2005's default web server.but in the iis
environment,it's return a error: Win32Exception (0x80004005): can't
find the files.

the parameter ExeFilePath is a net-share file.and AudioFilePath is a
net share path.

can u tell me how to setup the iis to use the page normal?

thanks adv.
 
 
 

it's a question abuot vs2005 default web server and the iis web server between.

Post by Jani Jvine » Tue, 11 Jul 2006 23:39:47

Topgene,


Your problem is in improper security settings and/or user accounts.

When you use IIS 6.0 to run your ASP.NET web applications, they run under a
different user account, namely the "Network Service" by default. When you
log in to the server, you are usually the Administrator. When you map a
network drive (for instance, use "net share"), you are doing so for the
Administrator account only. When IIS runs your ASP.NET app, it won't be able
to "see" that networked drive, because it was for the different user.

This is how it goes simplified, anyway. Now, you could try using a UNC paths
(\\servername\share\path\app.exe) instead of regular paths (K:\path\app.exe)
to see if that helps. However, this might not work, also because of the
security. In that case, you need to either change the user account that runs
your application pool in IIS or you need to give permissions to your file
share (and possibly, NTFS file system rights on the server) for the Network
Service user.

All in all, you need to learn a bit more about security in IIS 6.0, and the
definite place to start is obviously the documentation:

http://www.yqcomputer.com/

Also, if you have the .NET 2.0 SDK documentation (that comes with Visual
Studio 2005) installed, then this link is also useful:

ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetconfig/html/47ebf3b5-98de-4d31-a335-57e2ccd974b8.htm

Finally, this link might prove useful in your situation:

http://www.yqcomputer.com/ ;en-us;842789

Hope this helps you to solve your issue.

--
Regards,

Mr. Jani Jvinen
C# MVP
Helsinki, Finland
XXXX@XXXXX.COM
http://www.yqcomputer.com/

 
 
 

it's a question abuot vs2005 default web server and the iis web server between.

Post by topgen » Thu, 27 Jul 2006 12:09:41

thank you very much.