Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Wednesday, March 28, 2012

Difficulty building site after ajax install.

I'm having some trouble with my first AJAX experience namely in the build/publish part. F5 build on VS server works fine only when I want to Publish the application to ready for deployment I get this error underneath. Looked at couple message boards but its not clear me. I've also tried aspnet_regsql without any affect. Does anyone have any idea whether this is AJAX related and how I can solve to build the project? greatly appreciated.

-- Build started: Project: D:\...\Application1\, Configuration: Debug .NET --

Index was outside the bounds of the array.

-- Skipped Publish: Project D:\...\Application1\, Configuration: Debug .NET --

just wanted to add something... if choose Build> Rebuild Webiste instead of publish if gives me 33 warning messages saying

"Could not find schema information for the element 'webServices' and all other elements I've added from the AJAX template.

The template version works fine. Don't see why this should make a difference. Default webserver runs work fine.

Arrgg


just wanted to add something... if choose Build> Rebuild Webiste instead of publish if gives me 33 warning messages saying

"Could not find schema information for the element 'webServices' and all other elements I've added from the AJAX template.

The template version works fine. Don't see why this should make a difference. Default webserver runs work fine.

Arrgg this is cracking my head as I can't find much info on it.

Monday, March 26, 2012

Detailed error messages with AJAX?

I'm building the front and back ends of a website and my issue is that when an error occurs in a section that is "ajaxed", the error is displayed in a javascript pop-up.

Is there any way that I can have it at least display a line number of the file causing the error? It's driving me crazy to debug, especially when I have dozens of classes working together. Please help. Thanks!

Ryan

Hi Ryan,

There are some good articles out there on the error handling in AJAX, but probably the first thing you need to do is to use the OnAsyncPostBackError attribute of the ScriptManager tag to add an event handler - allowing you to log the exception, or do something else with it.

Then you can start looking at supressing the alert, etc.

ScottGU's blog has a post which might be a good starting point when you want to go into a bit more depth, and produce a response which is more aimed at the users than developers!


You canadd custom handling of async errors pretty easily.

In that example, check out args._error for more details. _error.lineNumber and _error.stack might be helpful to you.