Daniel15 / RouteJs

JavaScript URL routing for ASP.NET MVC and WebForms
84 stars 19 forks source link

"Object reference not set to an instance of an object" error in web environment #52

Closed taxpayer closed 7 years ago

taxpayer commented 8 years ago

Hello! First, thank you for your great project, it helps me keeping tidy the MVC routes in Javascript.

Today I published my current project (the one I first used RouteJs) in my web environment and I'm getting a "Object reference not set to an instance of an object." from the line <script src="@RouteJs.RouteJsHandler.HandlerUrl"></script> in _Layout.cshtml. I'm sure it's from here because without the line the pages load without problems.

I've double-checked the configuration settings in web.config from the readme file. I've also tested the debug attribute from with true and false values. Other important information is that in my local debugging environment, everything works fine.

I'm using the last version of RouteJS, MVC 5 in a IIS 8.0. I searched a lot for someone with the same problem, but I could not find. If you have any tip on this, I'd thank you a lot. I'm attaching a printscreen of the error.

Thanks in advance, Rodrigo

image

Daniel15 commented 8 years ago

Hmm, this is pretty strange. Are you able to create a minimal project that still replicates the issue? For example, if you create a brand new MVC 5 site and add RouteJs to it, does it still replicate the issue?