Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Wednesday, March 28, 2012

Web Service

Hello.
Hello.

I use a web service that I created through a custom
control on a windows form and it works fine. However, if iput this control
on a
webform usinf the <object...classid..> label, i get an security error when i
call the web service
saying:

"The application attempted to perform an operation not
allowed by the security policy. The operation required the
SecurityException. To grant this application the required
permission please contact your system administrator, or
use the Microsoft .NET security policy administration tool.

Request for the permission of type
System,Net.WebPermission..."

What can i do?
I don't know how to explicitly trust the assembly.

ThanksYou'll need to use CASPOL.exe from the command line, or use the
framework configuration UI [1] under the Administrative Tools menu on
the computer.

What I would do is use these tools to grant the additional permissions
through a new code group [2] based on either a strong name or a URL
membership condition. Since URLs can be spoofed I'd suggest you string
name the assembly with your custom control and use the strong name
membership.

--
Scott
http://www.OdeToCode.com/blogs/scott/

[1]
http://msdn.microsoft.com/library/d...mscorcfgmsc.asp

[2]
http://msdn.microsoft.com/library/d...odegroups .asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 30 Aug 2005 09:13:34 +0200, "Aurelio"
<corcharelliARROBAhotmail.com> wrote:

>Hello.
>Hello.
>I use a web service that I created through a custom
>control on a windows form and it works fine. However, if iput this control
>on a
>webform usinf the <object...classid..> label, i get an security error when i
>call the web service
>saying:
>"The application attempted to perform an operation not
>allowed by the security policy. The operation required the
>SecurityException. To grant this application the required
>permission please contact your system administrator, or
>use the Microsoft .NET security policy administration tool.
>Request for the permission of type
>System,Net.WebPermission..."
>What can i do?
>I don't know how to explicitly trust the assembly.
>Thanks

Web Service

Hello.
Hello.
I use a web service that I created through a custom
control on a windows form and it works fine. However, if iput this control
on a
webform usinf the <object...classid..> label, i get an security error when i
call the web service
saying:
"The application attempted to perform an operation not
allowed by the security policy. The operation required the
SecurityException. To grant this application the required
permission please contact your system administrator, or
use the Microsoft .NET security policy administration tool.
Request for the permission of type
System,Net.WebPermission..."
What can i do?
I don't know how to explicitly trust the assembly.
ThanksYou'll need to use CASPOL.exe from the command line, or use the
framework configuration UI [1] under the Administrative Tools menu on
the computer.
What I would do is use these tools to grant the additional permissions
through a new code group [2] based on either a strong name or a URL
membership condition. Since URLs can be spoofed I'd suggest you string
name the assembly with your custom control and use the strong name
membership.
Scott
http://www.OdeToCode.com/blogs/scott/
[1]
http://msdn.microsoft.com/library/d...gm
sc.asp
[2]
http://msdn.microsoft.com/library/d...r />
groups.asp
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 30 Aug 2005 09:13:34 +0200, "Aurelio"
<corcharelliARROBAhotmail.com> wrote:

>Hello.
>Hello.
>I use a web service that I created through a custom
>control on a windows form and it works fine. However, if iput this control
>on a
>webform usinf the <object...classid..> label, i get an security error when
i
>call the web service
>saying:
>"The application attempted to perform an operation not
>allowed by the security policy. The operation required the
>SecurityException. To grant this application the required
>permission please contact your system administrator, or
>use the Microsoft .NET security policy administration tool.
>Request for the permission of type
>System,Net.WebPermission..."
>What can i do?
>I don't know how to explicitly trust the assembly.
>Thanks
>
>

Saturday, March 24, 2012

Web Service Problem

Dear All,

I have written a Web Service which is called from ASPX file(Web Form). It
works fine on the local machine. On the local machine I am using the
following command

wsdl.exe /l:cs http://localhost/ReturnEvents/Service1.asmx?wsdl

Now I want to use the same service on the Remote Server. What I think is
that the
above path should be changed as it is localhost. So I try to do something
like this

wsdl.exe /l:cs http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl

where www.hop.man.ac.uk is the server where I am trying to host my web service

But it does not compile and throws the following error:

There was an error downloading:

http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl

The request failed with HTTP status 404: Not Found

I dont know whether I going in a right direction. It works fine on the
client machine
But on the server when I change the path to my server name it throws this
error.I mean we cant use localhost in the wsdl when using Web service on the
REMOTE server. Dont know what to do. Any help would be greatly appreciated.

Cheers,

Sunil SabirCheck your spelling. The 404 error indicates that the requested resource
(URL) was not found.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Sunil Sabir" <SunilSabir@.discussions.microsoft.com> wrote in message
news:AC4B5CFD-DFFB-4990-A131-B71795B5ABB5@.microsoft.com...
> Dear All,
> I have written a Web Service which is called from ASPX file(Web Form). It
> works fine on the local machine. On the local machine I am using the
> following command
> wsdl.exe /l:cs http://localhost/ReturnEvents/Service1.asmx?wsdl
> Now I want to use the same service on the Remote Server. What I think is
> that the
> above path should be changed as it is localhost. So I try to do something
> like this
> wsdl.exe /l:cs http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
> where www.hop.man.ac.uk is the server where I am trying to host my web
service
> But it does not compile and throws the following error:
> There was an error downloading:
> http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
> The request failed with HTTP status 404: Not Found
> I dont know whether I going in a right direction. It works fine on the
> client machine
> But on the server when I change the path to my server name it throws
this
> error.I mean we cant use localhost in the wsdl when using Web service on
the
> REMOTE server. Dont know what to do. Any help would be greatly
appreciated.
> Cheers,
> Sunil Sabir
>
>

Web Service Problem

Dear All,
I have written a Web Service which is called from ASPX file(Web Form). It
works fine on the local machine. On the local machine I am using the
following command
wsdl.exe /l:cs http://localhost/ReturnEvents/Service1.asmx?wsdl
Now I want to use the same service on the Remote Server. What I think is
that the
above path should be changed as it is localhost. So I try to do something
like this
wsdl.exe /l:cs http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
where www.hop.man.ac.uk is the server where I am trying to host my web servi
ce
But it does not compile and throws the following error:
There was an error downloading:
http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
The request failed with HTTP status 404: Not Found
I dont know whether I going in a right direction. It works fine on the
client machine
But on the server when I change the path to my server name it throws this
error.I mean we cant use localhost in the wsdl when using Web service on the
REMOTE server. Dont know what to do. Any help would be greatly appreciated.
Cheers,
Sunil SabirCheck your spelling. The 404 error indicates that the requested resource
(URL) was not found.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
"Sunil Sabir" <SunilSabir@.discussions.microsoft.com> wrote in message
news:AC4B5CFD-DFFB-4990-A131-B71795B5ABB5@.microsoft.com...
> Dear All,
> I have written a Web Service which is called from ASPX file(Web Form). It
> works fine on the local machine. On the local machine I am using the
> following command
> wsdl.exe /l:cs http://localhost/ReturnEvents/Service1.asmx?wsdl
> Now I want to use the same service on the Remote Server. What I think is
> that the
> above path should be changed as it is localhost. So I try to do something
> like this
> wsdl.exe /l:cs http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
> where www.hop.man.ac.uk is the server where I am trying to host my web
service
> But it does not compile and throws the following error:
> There was an error downloading:
> http://www.hop.man.ac.uk/ReturnEven...vice1.asmx?wsdl
> The request failed with HTTP status 404: Not Found
> I dont know whether I going in a right direction. It works fine on the
> client machine
> But on the server when I change the path to my server name it throws
this
> error.I mean we cant use localhost in the wsdl when using Web service on
the
> REMOTE server. Dont know what to do. Any help would be greatly
appreciated.
> Cheers,
> Sunil Sabir
>
>
>
>

Web Service Question

First you must forgive me because I am new to web services! My question/sit
uation is this. I have a messenger program (Windows Form based) that uses a
web service. Is there any way to check if that web service is online at an
y given time. I have read
where programs that use web services will "hang" if the service goes down.
Is there any way to make sure a web service is up before executing function
calls against it? Please post examples. I love this .NET stuff! C# is ver
y even for a former ja
va guy.
Thank you in advance,
DeanOn Mon, 5 Jul 2004 14:32:01 -0700, Dean Bortell
<DeanBortell@.discussions.microsoft.com> wrote:

>First you must forgive me because I am new to web services! My question/situation
is this. I have a messenger program (Windows Form based) that uses a web service.
Is there any way to check if that web service is online at any given time. I have r
ead
where programs that use web services will "hang" if the service goes down.
Is there any way to make sure a web service is up before executing function
calls against it? Please post examples. I love this .NET stuff! C# is ver
y even for a former j
ava guy.
>
A web service is nothing more than a web page with a well publicized
way of sending and receiving data. Other than just sending something
and seeing what comes back, I dont know of anything else.
Of course, it should be something you can track as well. If you want
to have a client side timeout, you could do so on your side.

Web Service Question

First you must forgive me because I am new to web services! My question/situation is this. I have a messenger program (Windows Form based) that uses a web service. Is there any way to check if that web service is online at any given time. I have read where programs that use web services will "hang" if the service goes down. Is there any way to make sure a web service is up before executing function calls against it? Please post examples. I love this .NET stuff! C# is very cool even for a former java guy.

Thank you in advance,

DeanOn Mon, 5 Jul 2004 14:32:01 -0700, Dean Bortell
<DeanBortell@.discussions.microsoft.com> wrote:

>First you must forgive me because I am new to web services! My question/situation is this. I have a messenger program (Windows Form based) that uses a web service. Is there any way to check if that web service is online at any given time. I have read where programs that use web services will "hang" if the service goes down. Is there any way to make sure a web service is up before executing function calls against it? Please post examples. I love this .NET stuff! C# is very cool even for a former java guy.

A web service is nothing more than a web page with a well publicized
way of sending and receiving data. Other than just sending something
and seeing what comes back, I dont know of anything else.

Of course, it should be something you can track as well. If you want
to have a client side timeout, you could do so on your side.