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

  • Thread starter Thread starter topgene
  • Start date Start date
T

topgene

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.
 
Topgene,
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.

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://technet2.microsoft.com/Windo...982a-418c-bfe7-4d5155b83f4a1033.mspx?mfr=true

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://support.microsoft.com/default.aspx?scid=kb;en-us;842789

Hope this helps you to solve your issue.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
thank you very much.
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 undera
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://technet2.microsoft.com/Windo...982a-418c-bfe7-4d5155b83f4a1033.mspx?mfr=true

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://support.microsoft.com/default.aspx?scid=kb;en-us;842789

Hope this helps you to solve your issue.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
Back
Top