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

X

xs8899

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?
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,747
Members
45,545
Latest member
rapter____0

Latest Threads

Top