By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,718 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,718 IT Pros & Developers. It's quick & easy.

Problem referencing web service

P: n/a
Hi

I am trying to get web reference to my first (!) web service which is on a
remote host. I am getting the following error;

Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

How can I tackle this problem? I have the below web.config file.

Thanks

Regards
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>

Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On 7/20/2004 1:41 PM, John wrote:
Hi

I am trying to get web reference to my first (!) web service which is on a
remote host. I am getting the following error;

Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

How can I tackle this problem? I have the below web.config file.

Thanks

Regards
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>


Are you sure it's not the web service on the other end w/ problems?
Sounds like they're throwing an exception on their end; are they a .NET
webservice? Cuz this error message could not be from your web.config
(you have custom errors off). If it's a .NET webservice, and you can
browse to the .asmx URL in your web browser, try that and see if it
comes up w/ the documentation page. You may not be able to do this as
they could disable that functionality.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2

P: n/a
Hi

The same problem comes in a web browser. How can I check remotely, where the
error in web service is? It worked fine on my local server.

Thanks

Regards
"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
On 7/20/2004 1:41 PM, John wrote:
Hi

I am trying to get web reference to my first (!) web service which is on a remote host. I am getting the following error;

Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

How can I tackle this problem? I have the below web.config file.

Thanks

Regards
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>


Are you sure it's not the web service on the other end w/ problems?
Sounds like they're throwing an exception on their end; are they a .NET
webservice? Cuz this error message could not be from your web.config
(you have custom errors off). If it's a .NET webservice, and you can
browse to the .asmx URL in your web browser, try that and see if it
comes up w/ the documentation page. You may not be able to do this as
they could disable that functionality.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #3

P: n/a
On 7/20/2004 3:16 PM, John wrote:
Hi

The same problem comes in a web browser. How can I check remotely, where the
error in web service is? It worked fine on my local server.

Thanks

Regards
"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
On 7/20/2004 1:41 PM, John wrote:
Hi

I am trying to get web reference to my first (!) web service which is on
a
remote host. I am getting the following error;

Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current
custom
error settings for this application prevent the details of the
application
error from being viewed remotely (for security reasons). It could,
however,
be viewed by browsers running on the local server machine.

How can I tackle this problem? I have the below web.config file.

Thanks

Regards
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>

Are you sure it's not the web service on the other end w/ problems?
Sounds like they're throwing an exception on their end; are they a .NET
webservice? Cuz this error message could not be from your web.config
(you have custom errors off). If it's a .NET webservice, and you can
browse to the .asmx URL in your web browser, try that and see if it
comes up w/ the documentation page. You may not be able to do this as
they could disable that functionality.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Well, you can't, as I assume this is someone else's webservice? The
reason is they have customErrors set to RemoteOnly in the service's
web.config, so you can't see the actual error unless you browse to it on
the server's browser itself. I would contact whoever owns it and say
you're getting an error. More than likely, something is erroring on
their side, causing you to not be able to use it.

Otherwise, if it's your webservice on another box you control, goto that
box and browse the same way, or change customErrors to Off in the
webservice's web.config.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #4

P: n/a
It is my web service and it works fine on my local server. Just doesn't work
when uploaded to the remote server. I have now tried a very simple project
(posted under separate thread) which also does not work at the remote server
but I can not see any error message to figure out what to do.

Thanks

Regards
"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
On 7/20/2004 3:16 PM, John wrote:
Hi

The same problem comes in a web browser. How can I check remotely, where the error in web service is? It worked fine on my local server.

Thanks

Regards
"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
On 7/20/2004 1:41 PM, John wrote:

Hi

I am trying to get web reference to my first (!) web service which is
on
a
remote host. I am getting the following error;

Server Error in '/' Application.

Runtime Error
Description: An application error occurred on the server. The current


custom
error settings for this application prevent the details of the


application
error from being viewed remotely (for security reasons). It could,


however,
be viewed by browsers running on the local server machine.

How can I tackle this problem? I have the below web.config file.

Thanks

Regards
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="Off" />
<authentication mode="None" />
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>

Are you sure it's not the web service on the other end w/ problems?
Sounds like they're throwing an exception on their end; are they a .NET
webservice? Cuz this error message could not be from your web.config
(you have custom errors off). If it's a .NET webservice, and you can
browse to the .asmx URL in your web browser, try that and see if it
comes up w/ the documentation page. You may not be able to do this as
they could disable that functionality.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Well, you can't, as I assume this is someone else's webservice? The
reason is they have customErrors set to RemoteOnly in the service's
web.config, so you can't see the actual error unless you browse to it on
the server's browser itself. I would contact whoever owns it and say
you're getting an error. More than likely, something is erroring on
their side, causing you to not be able to use it.

Otherwise, if it's your webservice on another box you control, goto that
box and browse the same way, or change customErrors to Off in the
webservice's web.config.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #5

P: n/a
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
It is my web service and it works fine on my local server. Just doesn't work when uploaded to the remote server. I have now tried a very simple project
(posted under separate thread) which also does not work at the remote server but I can not see any error message to figure out what to do.
You should be trapping your errors in one way or another. Do you have a
handler for the Error event in global.asax? It could trap the error and then
write it out somewhere.

Given that this is a web service, you'd probably want to write the error to
the system event log. You'll want to create a
System.Diagnostics.EventLogTraceListener in Application_Start, and add it to
the System.Diagnostics.Trace.Listeners collection. Then, in the Error
handler, you can use
"System.Diagnostics.Trace.WriteLine(Server.GetLast Error().ToString())".

The only complication is that the event source must already exist, as the
ASPNET account by default has enough privileges to write an event, but not
enough to create a new event source. You would want to create an event log
installer first. Here's what you do:

1. Open global.asax _in the designer_
2. From the toolbox, drag an EventLog component (from the Components tab)
onto the design surface.
3. With the new event log selected, use the Property browser to set the Log
and Source properties. You should set the Log to "Application" and the
Source to one of your choice, perhaps the name of the Web Service.
4. If you right-click the event log component, you'll see a menu choice for
"Add Installer". Select this. This will add an appropriately-configured
event log installer to your project.
5. Build your web service

Now, after deploying the new web service assembly to your remote server,
you'll have to run the installutil utility against the new assembly, on the
remote server. For instance, use Terminal Services to connect to the remote
server, then use a command prompt to connect to the bin directory of your
web service and enter the command:

installutil -i <webServiceAssembly>.dll

That will run the event log installer to install the event source, and your
web service should be able to write to it. Note that you will only need to
run installutil if the event log installer properties change, or if you want
to remove the event log source.

I hope that helps.
--
John Saunders
johnwsaundersiii at hotmail

"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
On 7/20/2004 3:16 PM, John wrote:
Hi

The same problem comes in a web browser. How can I check remotely, where
the
error in web service is? It worked fine on my local server.

Thanks

Regards
"Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

>On 7/20/2004 1:41 PM, John wrote:
>
>>Hi
>>
>>I am trying to get web reference to my first (!) web service which is on
a

>>remote host. I am getting the following error;
>>
>>Server Error in '/' Application.
>>
>>Runtime Error
>>Description: An application error occurred on the server. The current

custom

>>error settings for this application prevent the details of the

application

>>error from being viewed remotely (for security reasons). It could,

however,

>>be viewed by browsers running on the local server machine.
>>
>>How can I tackle this problem? I have the below web.config file.
>>
>>Thanks
>>
>>Regards
>>
>>
>><?xml version="1.0" encoding="utf-8" ?>
>><configuration>
>> <system.web>
>> <compilation defaultLanguage="vb" debug="true" />
>> <customErrors mode="Off" />
>> <authentication mode="None" />
>> <authorization>
>> <allow users="*" /> <!-- Allow all users -->
>> </authorization>
>> <trace enabled="true" requestLimit="10" pageOutput="true"
>>traceMode="SortByTime" localOnly="true" />
>> <sessionState
>> mode="InProc"
>> stateConnectionString="tcpip=127.0.0.1:42424"
>> sqlConnectionString="data

source=127.0.0.1;Trusted_Connection=yes">> cookieless="false"
>> timeout="20"
>> />
>> <globalization requestEncoding="utf-8" responseEncoding="utf-8" />>> </system.web>
>></configuration>
>>
>>
>>
>Are you sure it's not the web service on the other end w/ problems?
>Sounds like they're throwing an exception on their end; are they a ..NET>webservice? Cuz this error message could not be from your web.config
>(you have custom errors off). If it's a .NET webservice, and you can
>browse to the .asmx URL in your web browser, try that and see if it
>comes up w/ the documentation page. You may not be able to do this as
>they could disable that functionality.
>
>--
>Craig Deelsnyder
>Microsoft MVP - ASP/ASP.NET

Well, you can't, as I assume this is someone else's webservice? The
reason is they have customErrors set to RemoteOnly in the service's
web.config, so you can't see the actual error unless you browse to it on
the server's browser itself. I would contact whoever owns it and say
you're getting an error. More than likely, something is erroring on
their side, causing you to not be able to use it.

Otherwise, if it's your webservice on another box you control, goto that
box and browse the same way, or change customErrors to Off in the
webservice's web.config.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.