开发者

Error publishing an asp 3.5 app

Well, I'm here to ask about some problem I have, the detail is that when I publish the application from my computer to the server folder and after make the changes in IIS when I try to browse the web app I get the next error:

Index and length must refer to a location within the string. Parameter name: length

In my local computer, I installed Visual Studio 2008 with SP1 and in the server is not installed only Framework 3.5.

Is the error related with Entity Framework or it's another problem?

Well, I hope you could help me... regards !

Stack Trace:

[ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length] System.Str开发者_StackOverflowing.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7495179 System.String.Substring(Int32 startIndex, Int32 length) +11 InnovaWebSite.Global.Session_Start(Object sender, EventArgs e) in C:\Users\cvelazquezt\Desktop\InnovaWeb\InnovaWebSite\Global.asax.cs:117 System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8783312 System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237 System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


The error thrown is from a substring operation. Where it is actually being thrown, I have no clue, as you have not actually posted the stack trace on the error. This could be because you don't know how to do this?

If you can find the stack trace, or even detail your code that gets pieces of a string, you will have a better context of the exception and be able to start doing something to cure it.

As for root cause, the fact it is only happening after publish indicates a) something is missing on the server or b) the server is configured incorrectly (wrong version of .NET for the app pool for example) or c) you have not correctly published the site (maybe copied from your compiled application rather than published and moved the published version over, etc.???)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜