Try our conversational search powered by Generative AI!

Site working in VS but not working on IIS

Vote:
 

Hi,

My EpiServer site is working well in Visual Studio but I tried to publish it on IIS but I get:

EpiServer 6.0 is installed on my computer.

Any help is appreciated.

Cédric

Server Error in '/' Application.


Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\92c6fb4c\87c6c133\App_Web_l0zt3bl2.0.cs    Line: 0

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Configuration.Settings.get_Instance() +28
   EPiServer.PageBase..cctor() +9

[TypeInitializationException: The type initializer for 'EPiServer.PageBase' threw an exception.]
   EPiServer.PageBase.OnPageSetup() +25
   PageTypeBuilder.UI.TemplatePage`1..ctor(Int32 enable, Int32 disable) +63
   Lidingoloppet.Default..ctor() +40
   ASP.default_aspx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\92c6fb4c\87c6c133\App_Web_l0zt3bl2.0.cs:0
   __ASP.FastObjectFactory_app_web_l0zt3bl2.Create_ASP_default_aspx() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\92c6fb4c\87c6c133\App_Web_l0zt3bl2.3.cs:0
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +174
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +42
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +516
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
#82442
Mar 12, 2014 13:08
Vote:
 

Is ASP.NET registered with the IIS? http://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=vs.100%29.aspx

#82445
Mar 12, 2014 14:09
Vote:
 

Yes it is. Other c# sites are working.

#82451
Mar 12, 2014 18:48
Vote:
 

Check if some of the config files are not transformed to something strange during publish, also check whether all necesary files are copied over to published location. Or "try to publish in IIS" means just bind the same directory to IIS site?

#82505
Mar 13, 2014 17:44
Vote:
 

When you say "it works in Visual Studio", is that IIS Express or Cassini (the built-in webserver)? If it works in Cassini you need to change the configuration files to get it to work on IIS 7 and later.

Here is a blog post that tells you how to get the correct configuration files http://www.markeverard.com/2010/05/21/default-episerver-web-configs-for-iis6-and-iis7/.

#82509
Edited, Mar 13, 2014 21:45
Vote:
 

Yes, I mean the site works when I run it in the built-in webserver in Visual Studio. I even tried to bind IIS to the same directory but what works through VS doesn't work through IIS 7.5 and the exception is the one I posted earlier.

I'll check the blog post you referred to.

Thx Johan and Valdis.

#82563
Edited, Mar 14, 2014 13:36
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.