locked
How to setup asp.net 2.0 website on IIS 6.0 to access content on a windows remote server RRS feed

  • Question

  • User1353320894 posted

    I have  2 machines on a domain. The first machine has IIS 6. 0 inatalled on it, whereas the second machine has published web content.

    On the local machine ie. Web server i have configured the website like "A Share located on another computer" Eg: //Machine2/Application1.

    The pubished web content is inside a shared folder on the remote machine.

    Finally when i run the application in browser(IE 7.0) i get the following error.

     

    Server Application Unavailable

    The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

    Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

     

    The Error in the Windows event viewer is as follows:

     

    Failed to initialize the AppDomain:/LM/W3SVC/1/Root/TstApp_Amit

    Exception: System.IO.FileLoadException

    Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.

    StackTrace: at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

    at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

    at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

    at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

    at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)

    at System.Activator.CreateInstance(String assemblyName, String typeName)

    at System.AppDomain.CreateInstance(String assemblyName, String typeName)

    at System.AppDomain.CreateInstance(String assemblyName, String typeName)

    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

    at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

    Please help me in finding a solution to this error.

     

    Thanks

    Nitin.

     

     

     

     

     

     

     

     

    Thursday, January 21, 2010 6:01 AM

Answers

  • User-152507730 posted

    Could you make sure IUSR_<Machine name> account (example IUSER_MachineName1) have minimum read permission on \\Machine2\applicaiton1 folder.

    HTH

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 21, 2010 9:23 AM
  • User-1659704165 posted

    Hi,

    It seems to me User Permisiion problem


    http://stackoverflow.com/questions/233478/asp-net-2-0-application-on-iis-5-resulting-in-error-aspnetwp-exe-pid-xxxx-s

    chk the above link for more info


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 21, 2010 9:25 AM
  • User-319574463 posted

    I have  2 machines on a domain

    You will need to run the web site using a domain service account and explicitly grant access on both machines.

    Contact your network administrator about setting up the account and setting up the share on the second machine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 24, 2010 3:30 AM
  • User1353320894 posted

    Guys i contacted Microsoft and they solved the problem.

    Actually u have to go to .Net Framework 2.0 Configuraton Tool. Then go to

    My Computer --> Runtime Security Policy --> Machine --> Code Groups --> All code.

    Right Click on All Code and select new.

    Type the new Code Group Name --> Select URL from the drop down list and in the URL Path type the machine name eg (\\machinename\*) --> Select FullTrust.

    * Denotes all files and Folders within the machine.

    Click Finish.

    The code should start working, at least it started working in my case.

    I really appreciate that u all gave ur valueable time in solving the problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 5, 2010 12:09 AM

All replies

  • User-152507730 posted

    Could you make sure IUSR_<Machine name> account (example IUSER_MachineName1) have minimum read permission on \\Machine2\applicaiton1 folder.

    HTH

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 21, 2010 9:23 AM
  • User-1659704165 posted

    Hi,

    It seems to me User Permisiion problem


    http://stackoverflow.com/questions/233478/asp-net-2-0-application-on-iis-5-resulting-in-error-aspnetwp-exe-pid-xxxx-s

    chk the above link for more info


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 21, 2010 9:25 AM
  • User-319574463 posted

    I have  2 machines on a domain

    You will need to run the web site using a domain service account and explicitly grant access on both machines.

    Contact your network administrator about setting up the account and setting up the share on the second machine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 24, 2010 3:30 AM
  • User1353320894 posted

    Guys i contacted Microsoft and they solved the problem.

    Actually u have to go to .Net Framework 2.0 Configuraton Tool. Then go to

    My Computer --> Runtime Security Policy --> Machine --> Code Groups --> All code.

    Right Click on All Code and select new.

    Type the new Code Group Name --> Select URL from the drop down list and in the URL Path type the machine name eg (\\machinename\*) --> Select FullTrust.

    * Denotes all files and Folders within the machine.

    Click Finish.

    The code should start working, at least it started working in my case.

    I really appreciate that u all gave ur valueable time in solving the problem.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 5, 2010 12:09 AM