Showing posts with label exception. Show all posts
Showing posts with label exception. Show all posts

Saturday, March 24, 2012

Warnings at web server side

Hello,

Log of IIS 5.0 under Win 2000 Server contains the following warnings relating to PreRender of the AJAX ScriptManager:

"Exception information:
Exception type: InvalidOperationException
Exception message: Partial rendering requires a browser that supports W3C DOM Level 1.0.

Thread information:
Thread ID: 11
Thread account name: WEBSERVERA\ASPNET
Is impersonating: False
Stack trace: at Microsoft.Web.UI.ScriptManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
"

Do you have an idea what the users see in their browsers in this case? Or please give me a hint which browser I should use to test this (I think it should be a really old one)

Regards,

Di.

Hi Di,

You are right about the browser being old. For AJAX to work the browser should support XMLHttp Object.

On your pages you can run a client script which would check for this object and display a browser compatibility issue than waiting for the page to be sent to the server.

Check this link on how to check for the object in different browsers.

http://www.w3schools.com/dom/dom_http.asp

Happy programming,
Anton


Hi Anton,

Thanks for the info.

But I still want to find out what users see in their browser in the case of such warnings. How does it affect their work with the web site...

Regards,

D.


I like your enthusiasm. You can download Multiple IE fromhttp://tredosoft.com/

which has simulator from IE 3.0 onwards.

You can also download older version of Netscape fromhttp://browser.netscape.com/ns8/download/archive.jsp

but they dont have all versions but start from 4.7 onwards

Happy programming,

Anton


Thanks. Will check 'em.

Was this error a bugs on AJAX Control Toolkit or what?

Kindly explain if the error below was a bugs on AJAX Control Toolkit or cause by what.

Error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --> System.NotSupportedException: This page is missing a HtmlHead control which is required for the CSS stylesheet link that is being added. Please add . at AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:line 229 at AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e) in d:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ScriptControlBase.cs:line 270 at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -- End of inner exception stack trace -- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.file_utilities_usermaster_edituser_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Thank you in advance,

Zed

Simple answer looks like no.

From the error it seems you have added a CSS without a head tag..i.e. ina control. And to register that CSS directly as you intend to do...use

AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control)

Hope that helps..


Thank you for your immediate response. My assumptions is that you're correct however the only thing that keeps me on thinking is that I did not changed or modify anything on the page and even the CSS file. The page is working fine from the beginning and suddenly I just received this error. Its kind a weird you know.Smile

Thanks again,

Zed


Hi Zed,

If you want me to investigate, Ia m more then happy to do so, but for that you will have to put the code here , else if its just one occasion, try replicating it. Are you using CSS control adapter by any chance.

If the answer above helped do not forget to mark so.

Thanks

Wednesday, March 21, 2012

Web Methodst that returns DataTable gives me exception error " "circular reference was det

Hello,

I am getting this error "circular reference was detected while serializing an object of type". The Method GetRecords() is a function that returns DataTable type.. It happens the same thing when i return DataSet as well.

Any help?

Thanks

function GetStatusRecord() {

// Invoke the Echo method on the server.

PageMethods.GetRecords('1', onComplete);

debugger;

// Callback function.

function onComplete(result) {

// Display the echoed string.

alert(result);

}

returnfalse

}

The latest version of Asp.net Ajax no longer allows to serialize DataTable and DataSet anymore.


you are probably right, i havent updated asp.net ajax for about 6 months.

Web service and time zones problem in AJAX ASP.NET Beta 1.0

Hello, I have the followong exception, during requesting a webservice.

Requested URL:https://www.some_site.com/Services/Logout.asmx/js
Exception Message: Specified argument was out of the range of valid values.
Parameter name: utcDate
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: utcDate
at System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
at System.Web.HttpCachePolicy.SetLastModified(DateTime date)
at Microsoft.Web.Script.Services.RestClientProxyHandler.ProcessRequest(HttpContext context)
at Microsoft.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thread: IsImpersonating = False

As I investigated, the problem originates because utcDate in method UtcSetLastModified is the date in future. This happens because the time zone on our side differs from the server's time zone where we deploy our application.

Please, HELP!

Thanks for letting us know about this problem! This looks like a valid bug.

How are you deploying your app? Am I correct in guessing you are using the "Publish web site" feature of VS or the "aspnet_compiler"? If not, can you please let me know how you deploy it?

Do you mean that the time zone is different on the computer where you built your app and the server where you deploy?

Until we fix the bug, one workaround I can think of is to "touch" the precompiled dlls in our app's bin directory to update the last modfied time on them.


We build our application using MSBuild on local TFS (one time zone), and then just copy all builded dll's and other files to production server (it is in another time zone).

Another workaround i've found is to set in ScriptManager->ServiceRefrence InlineScript property to true, then all js for my web service will be included in the output page, so there's no need to requesthttps://www.some_site.com/Services/Logout.asmx/js