Server Error in '/' Application
Problem reported by David Short - 4/1/2015 at 10:46 AM
Resolved
Hoping for a quick fix; I purchased and setup SmarterMail on Server 2008.  Working fine with built in web server.  When I followed these instructions and moved it to IIS 7.5, I get an error message when trying to browse the site.  It tells me "Server Error in '/' Application 

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. 
 
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".

<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="RemoteOnly"/>
    </system.web>
</configuration> 
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="On" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration> 
Any help would be greatly appreciated!

4 Replies

Reply to Thread
0
Bruce Barnes Replied
Did you follow the instructions in Set up SmarterMail as an IIS Site (IIS 7.0/7.5), and pay attention to:
 
these two sections:
 

Add an Application Pool
Follow these steps to add an application pool specifically for SmarterMail:

  1. Open Internet Information Services (IIS) Manager
  2. Right click on Application Pools from the tree view and choose Add Application Pool
  3. Name the new application pool SmarterMail, or something similarly easy to identify
  4. Set the .Net Framework Version to v4.0.x
  5. Set the Application Pools Managed Pipeline to 'Integrated'
  6. Make sure "Start application pool immediately" is checked
  7. Click OK
 
and
 

Verify IIS Settings
Follow these steps to verify the IIS settings. Please read each item carefully.

  1. In IIS Manager, click on your ServerName
  2. Under IIS, double click ISAPI and CGI Restrictions
  3. Verify that ASP .NET v4.0 is allowed. If it is not, right-click on ASP .NET v4.0 and select Allowed
  4. In the tree view, click Sites
  5. Expand (or double click) the SmarterMail site
  6. Click on the App_Themes folder
  7. Under IIS, double click HTTP Response Headers
  8. Under the Action menus, click Set Common Headers
  9. Enable the Expire Web content setting
    • Click After
    • Add 7 for the number of days
  10. Click OK
  11. Click on Application Pools in the tree view
  12. Right click on the SmarterMail application pool and select Advanced Settings
  13. Under the Process Model heading, ensure the Identity is set to the NetworkService account
  14. From the Start menu, open Administrative Tools and select Services, then verify that the World Wide Publishing Service is running
Bruce Barnes
ChicagoNetTech Inc
brucecnt@comcast.net

Phonr: (773) 491-9019
Phone: (224) 444-0169

E-Mail and DNS Security Specialist
Network Security Specialist

Customer Service Portal: https://portal.chicagonettech.com
Website: https://www.ChicagoNetTech.com
Security Blog: http://networkbastion.blogspot.com/

Web and E-Mail Hosting, E-Mail Security and Consulting
0
David Short Replied
I did follow the directions to the letter.  What I did next was to edit the webconfig file to allow me to see the exact errors that were being encountered.
 
Turns out that the temp directory for .NET framework 4.0 did not have the proper permissions for the service account (Network Service).  I had to run Microsoft's tool (ASPREG_IIS) to effectively modify access and "reset" the .NET framework.
 
Once I did this, I restarted the web service and everything started working.
 
Thanks for the rapid response!  I hope my experience helps others who may run into this issue with .NET framework hiccups.
 
David
0
Bruce Barnes Replied
Glad you got it working, David.  Did you use the version of ASPREG_IIS which was included with your installed OS, or did you download from Technet?
 
Mind sharing the command line switches you used so that others might be able to resolve similar issues?
Bruce Barnes
ChicagoNetTech Inc
brucecnt@comcast.net

Phonr: (773) 491-9019
Phone: (224) 444-0169

E-Mail and DNS Security Specialist
Network Security Specialist

Customer Service Portal: https://portal.chicagonettech.com
Website: https://www.ChicagoNetTech.com
Security Blog: http://networkbastion.blogspot.com/

Web and E-Mail Hosting, E-Mail Security and Consulting
1
David Short Replied
I am running Windows Server 2008 R2, and the file is already present on the 64 bit versions in the directory where the .NET framework installs it -- C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727   - open a command line and navigate to that directory before calling it -->    aspnet_regiis -i      then run with -ir  then -iru  then -enable
Each of these will function in a different manner, but it registers the proper components and enables them with IIS.
 
Hope this helps.  Feel free to ping back if you need further clarification.
 
David

Reply to Thread