PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 3.67 average.

Exception of type 'System.Web.HttpUnhandledException' was thrown.

 
 
xs8899
Guest
Posts: n/a
 
      5th Jun 2009
Hi all,

I create a simple web service that returns "Hello World".

I created a simple aspx in the same project that consume this web service.

Everything works fine until I move them to online.

When I tried to attach the query string to the URL i receive the following

E.g. http://somelocation/test/home.aspx?jsonp=TestMethod

1 Error occurred at http://www.somelocation.com/Test/home.aspx?jsonp=Test
at Saturday, June 06, 2009, 1:43:45 AM Error Message is Exception of type
'System.Web.HttpUnhandledException' was thrown.
2 Error Source is System.Web
3 Stack Trace is at System.Web.UI.Page.HandleError(Exception e)
4 at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
5 at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
6 at System.Web.UI.Page.ProcessRequest()
7 at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
8 at System.Web.UI.Page.ProcessRequest(HttpContext context)
9 at ASP.home_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\test\a2b7a5cd\4996ac5\App_Web_z8je6hgy.1.cs:line 0
10 at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
11 at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) Referrer is User Agent is Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR
3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)
12


1 namespace WebApplication2
2 {
3 public partial class Home : System.Web.UI.Page
4 {
5 protected void Page_Load(object sender, EventArgs e)
6 {
7 if (!string.IsNullOrEmpty(Request.QueryString["jsonp"]))
8 CallBack();
9 }
10
11 public void CallBack()
12 {
13 string Callback = Request.QueryString["jsonp"];
14 if (!string.IsNullOrEmpty(Callback))
15 {
16 localhost.WebService w = new
WebApplication2.localhost.WebService();
17 Response.Write(Callback + w.Test());
18 }
19
20 Response.End();
21 }
22
23 }
24 }

When I tried to remove the codes for the web service call, I don't receive
the error. Which makes me suspect that the problem lies with the call of the
web service in a remote location.

Any ideas?

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      6th Jun 2009
On Jun 5, 8:00*pm, xs8899 <xs8...@discussions.microsoft.com> wrote:
> Hi all,
>
> I create a simple web service that returns "Hello World".
>
> I created a simple aspx in the same project that consume this web service..
>
> Everything works fine until I move them to online.
>
> When I tried to attach the query string to the URL i receive the following
>
> E.g.http://somelocation/test/home.aspx?jsonp=TestMethod
>
> 1 * *Error occurred athttp://www.somelocation.com/Test/home.aspx?jsonp=Test
> at Saturday, June 06, 2009, 1:43:45 AM Error Message is Exception of type
> 'System.Web.HttpUnhandledException' was thrown.
> 2 * *Error Source is System.Web
> 3 * *Stack Trace is * *at System.Web.UI.Page.HandleError(Exception e)
> 4 * * * at System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> 5 * * * at System.Web.UI.Page.ProcessRequest(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> 6 * * * at System.Web.UI.Page.ProcessRequest()
> 7 * * * at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
> 8 * * * at System.Web.UI.Page.ProcessRequest(HttpContext context)
> 9 * * * at ASP.home_aspx.ProcessRequest(HttpContext context) in
> c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
> Files\test\a2b7a5cd\4996ac5\App_Web_z8je6hgy.1.cs:line 0
> 10 * * *at
> System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplicat ion.IExecutionStep.Execute()
> 11 * * *at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
> Boolean& completedSynchronously) Referrer is User Agent is Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR
> 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.30729)
> 12 *
>
> 1 * *namespace WebApplication2
> 2 * *{
> 3 * * * *public partial class Home : System.Web.UI.Page
> 4 * * * *{
> 5 * * * * * *protected void Page_Load(object sender, EventArgs e)
> 6 * * * * * *{
> 7 * * * * * * * *if (!string.IsNullOrEmpty(Request.QueryString["jsonp"]))
> 8 * * * * * * * * * *CallBack();
> 9 * * * * * *}
> 10 *
> 11 * * * * * public void CallBack()
> 12 * * * * * {
> 13 * * * * * * * string Callback = Request.QueryString["jsonp"];
> 14 * * * * * * * if (!string.IsNullOrEmpty(Callback))
> 15 * * * * * * * {
> 16 * * * * * * * * * localhost.WebService w = new
> WebApplication2.localhost.WebService();
> 17 * * * * * * * * * Response.Write(Callback + w.Test());
> 18 * * * * * * * }
> 19 *
> 20 * * * * * * * Response.End();
> 21 * * * * * }
> 22 *
> 23 * * * }
> 24 * }
>
> *When I tried to remove the codes for the web service call, I don't receive
> the error. Which makes me suspect that the problem lies with the call of the
> web service in a remote location.
>
> Any ideas?


The code looks correct, are you sure that .net is properly installed
and version is correct?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs Microsoft ASP .NET 1 16th Nov 2007 06:57 PM
Publish exception to Email in Exception Handling Exception Block =?Utf-8?B?ZW15?= Microsoft C# .NET 1 31st Mar 2005 12:45 PM
Exception of type System.Exception was thrown Selen Microsoft ASP .NET 0 28th May 2004 08:19 AM
Exception of type System.Exception was thrown. Selen Microsoft C# .NET 6 28th May 2004 02:23 AM
Problems during execution on device:' An unhandled exception of type 'System.Exception' occurred in System.Drawing.dll' Domenico La Fauci Microsoft Dot NET Compact Framework 1 30th Oct 2003 01:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 AM.