Tuesday, 15 June 2010

c# - Exe working if executing from VS2012 but not working when hosted on IIS -


I am executing this code from the MVC website. If I run this code from VS 2012 IIS Express it is working but if I host the website on the IIS server, it does not work. I tried debugging but some error code is coming in if I impersonate my ID and pass my ID but all it is worthless, I need it.

Code:

  System.Diagnostics.Process proc = new System.Diagnostics.Process (); Four [] chr = password TocharArray (); System.Security.SecureString pwd = New System.Security.SecureString (); Foreign Currency (CR in Four C) {pwd.AppendChar (C); } Proc.StartInfo.FileName = Path to WZZip.exe //proc.StartInfo.Arguments = -ys20480 pathtosplit LandingZone; Proc.start.info.UserName = Username; // config file proc.StartInfo.Password = pwd; //config file comes from proc.StartInfo.Domain = Domain; //config file comes from proc.StartInfo.RedirectStandardError = true; Proc.StartInfo.RedirectStandardOutput = True; Proc.StartInfo.UseShellExecute = false; Bool Results = proc.Start ();  

On running an exchanges through IIS, you should start with a few questions:

A) Should I bypass the security built into the security of IIS server and Windows system?

B) If you allow executables to use different paths in the OS or IIS, then who else can use it, namely "Hawker"? C) Changes to Windows and IIS servers have been changed to protect the system from "attack" and to limit the surface area for the exploiters. Security monitoring is being done for the system & amp; IIS server?

If you can correct the risk for A-C, then you can "work" around restrictions.

If you understand the risks, tools to help with some issues.

You have limitations for standard users and permissions and rights for Windows Vista Windows 7 Windows 2008

Who can do this? / P>

You can also search for "Changes in Windows Distortion Security" (Round or Bing) "Session (0) Change and Effect for Systems and Services"

You also get a copy of it "Vista Developer Story" from the Microsoft Download Center

You should check the MSDN Library for design using User Access Control (UAC).

Many security

Finally add mime types to IIS

  • Open IIS Manager.

  • Browse the IIS site or subfolders where Thinpace XE

  • That site or subfolder Right click on and select Properties.

  • Select the HTTP Headers tab.

  • Click the MIME type button.

  • In the extension box, type ".exe".

  • In the MIME type box, type "application / octet-stream".

  • Click OK.


No comments:

Post a Comment