0

I keep experiencing this runtime error when I attempt to visit my website on a webhost(Somee is the host).

Runtime Error

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 remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

Details: To enable the details of this specific error message to be viewable on remote machines, 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 "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </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="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

I placed the tag into my WebConfig but it still gives me the same error! I'm sure I placed it correctly.. What could be the problem??

-Edit: Ok I fixed that error but now I can see the exception. This is the error.

Format of the initialization string does not conform to specification starting at index 0.

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.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ArgumentException: Format of the initialization string does not conform to specification starting at index 0.]
   System.Data.EntityClient.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, String& keyname, String& keyvalue) +7889185
   System.Data.EntityClient.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Hashtable synonyms) +119
   System.Data.EntityClient.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms) +82
   System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +8489924
   System.Data.EntityClient.EntityConnection..ctor(String connectionString) +43
   System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +85
   Blog.Models.BlogModel..ctor() +16
   Blog.Controllers.PostController..ctor() +26

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.Activator.CreateInstance(Type type) +6
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +55

[InvalidOperationException: An error occurred when trying to create a controller of type 'Blog.Controllers.PostController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +179
   System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +197
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +49
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +301
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Dezmen Ceo Sykes
  • 179
  • 1
  • 4
  • 16
  • Is there any other config file in child folders? – Xaqron May 02 '13 at 03:01
  • Then it is overwriting the parent. Correct that one. – Xaqron May 02 '13 at 03:16
  • Now you see the exception and can debug your code. Show us your code. – Xaqron May 02 '13 at 03:18
  • Perhaps your connection string information is wrong or the DB requires credentials you aren't passing. [Poss Duplicate](http://stackoverflow.com/questions/15397705/entity-framework-format-of-the-initialization-string-at-index-0) or [this one](http://stackoverflow.com/questions/3962805/entity-framework-connection-string-trouble). – MikeSmithDev May 02 '13 at 03:38
  • One guy said copy the string from your DLL config to the web config, wheres the dll config??? – Dezmen Ceo Sykes May 02 '13 at 03:50

0 Answers0