Showing posts with label webservices. Show all posts
Showing posts with label webservices. Show all posts

Wednesday, March 28, 2012

web service 401 unauthorized

I am using Avanade ACA web services which I guess uses .net web
services under the wraps. My requirement is use windows authentication
and allow user identity to pass thru to the web service and then to a
database.
I have two websites in the same box - one is the UI and other is the
webservices. It works when I have anonymous clicked on in the
webservices but it does not work when I switch this off and windows
authentication on. It throws the exception - system.net.webexception
401 Unathorrized.
I have tried using
<system.net>
<defaultProxy useDefaultCredentials="true">
<system.net>
in the web services but with no success. I have also given all
permissions to the Network Service (default app pool identity) for the
file system for the web site.
Now this looks like a common problem with .net web services and I am
not sure what else I can try.
Anyone done this before or have some idea?
Thanks in advance
Kishana Webservice method call simply transmits a SOAP envelope; no windows
credentials are included. So using Windows authentication in the IIS without
some sort of mechanism to transmit credentials as one would get with a norma
l
browser request that knows how to reply to the www-authenticate challenge is
not going to work.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"kishan.bisht@.gmail.com" wrote:

> I am using Avanade ACA web services which I guess uses .net web
> services under the wraps. My requirement is use windows authentication
> and allow user identity to pass thru to the web service and then to a
> database.
> I have two websites in the same box - one is the UI and other is the
> webservices. It works when I have anonymous clicked on in the
> webservices but it does not work when I switch this off and windows
> authentication on. It throws the exception - system.net.webexception
> 401 Unathorrized.
> I have tried using
> <system.net>
> <defaultProxy useDefaultCredentials="true">
> <system.net>
> in the web services but with no success. I have also given all
> permissions to the Network Service (default app pool identity) for the
> file system for the web site.
> Now this looks like a common problem with .net web services and I am
> not sure what else I can try.
> Anyone done this before or have some idea?
> Thanks in advance
> Kishan
>
On Mar 20, 12:46=A0am, Peter Bromberg [C# MVP]
<pbromb...@.yahoo.NoSpamMaam.com> wrote:
> a Webservice method call simply transmits a SOAP envelope; no windows
> credentials are included. So using Windows authentication in the IIS witho=[/color
]
ut
> some sort of mechanism to transmit credentials as one would get with a nor=[/color
]
mal
> browser request that knows how to reply to the www-authenticate challenge =[/color
]
is
> not going to work.
> -- Peter
> Site:http://www.eggheadcafe.com
> UnBlog:http://petesbloggerama.blogspot.com
> Short Urls & more:http://ittyurl.net
>
> "kishan.bi...@.gmail.com" wrote:
>
>
>
>
>
>
>
> - Show quoted text -
Thanks Peter.
So that means if I need to invoke web services programmatically from
the asp.net I will have to explicitly set user credentials on the SOAP
header.
Is there something built into the framework to do that?
Kishan

Monday, March 26, 2012

Web service does not show up while adding web reference

Hi,
If I create a Virtual directory with application name
programmatically it will not show up in the available web
services while adding web reference(Dynamic discovery
fails).

Where as if I create the virtual directory manually it
will shown up while adding web reference.

I have used the following code to create it
programmatically on IIS 5.0

I have checked the property pages of virtual directory
created using both the methods they look same.

Set IIsWebVDirRootObj = GetObject
("IIS://LocalHost/W3SVC/1/Root")
Set IIsWebVDirObj = IIsWebVDirRootObj.Create
("IIsWebVirtualDir", "MySecureAPP")

IIsWebVDirObj.Put "Path", "C:\MySecure"
IIsWebVDirObj.Put "AccessRead", True
IIsWebVDirObj.Put "AccessScript", True
IIsWebVDirObj.Put "AppIsolated",2

IIsWebVDirObj.AppCreate2 1
IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
IIsWebVDirObj.SetInfo

Thanks
KiranJust wondering is this in WSH?
What Language?

"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
news:011501c36807$f4561d90$a401280a@.phx.gbl...
> Hi,
> If I create a Virtual directory with application name
> programmatically it will not show up in the available web
> services while adding web reference(Dynamic discovery
> fails).
> Where as if I create the virtual directory manually it
> will shown up while adding web reference.
> I have used the following code to create it
> programmatically on IIS 5.0
> I have checked the property pages of virtual directory
> created using both the methods they look same.
> Set IIsWebVDirRootObj = GetObject
> ("IIS://LocalHost/W3SVC/1/Root")
> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
> ("IIsWebVirtualDir", "MySecureAPP")
> IIsWebVDirObj.Put "Path", "C:\MySecure"
> IIsWebVDirObj.Put "AccessRead", True
> IIsWebVDirObj.Put "AccessScript", True
> IIsWebVDirObj.Put "AppIsolated",2
> IIsWebVDirObj.AppCreate2 1
> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
> IIsWebVDirObj.SetInfo
>
> Thanks
> Kiran
This is VbScript that uses ADSI objects.
I have tried with C# too, but the same problem exiits

C# Code
DirectoryEntry IISRoot = new DirectoryEntry("IIS://" +
m_strServer + "/W3SVC/1/Root");
DirectoryEntry newDir =
IISRoot.Children.Add( m_strVDirName, "IIsWebVirtualDir");
newDir.Properties["Path"]
[0] = m_strVDirPath;
newDir.Properties
["AccessFlags"][0] = "513";
newDir.Properties
["AppIsolated"][0] = "2";
//newDir.Properties
["AccessWrite"][0] = "True";
newDir.Properties
["AppFriendlyName"][0] = m_strVDirName;
newDir.Invoke
( "AppCreate", true );
newDir.CommitChanges();

Thanks
Kiran

>--Original Message--
>Just wondering is this in WSH?
>What Language?
>"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
>news:011501c36807$f4561d90$a401280a@.phx.gbl...
>> Hi,
>> If I create a Virtual directory with application name
>> programmatically it will not show up in the available
web
>> services while adding web reference(Dynamic discovery
>> fails).
>>
>> Where as if I create the virtual directory manually it
>> will shown up while adding web reference.
>>
>> I have used the following code to create it
>> programmatically on IIS 5.0
>>
>> I have checked the property pages of virtual directory
>> created using both the methods they look same.
>>
>> Set IIsWebVDirRootObj = GetObject
>> ("IIS://LocalHost/W3SVC/1/Root")
>> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
>> ("IIsWebVirtualDir", "MySecureAPP")
>>
>> IIsWebVDirObj.Put "Path", "C:\MySecure"
>> IIsWebVDirObj.Put "AccessRead", True
>> IIsWebVDirObj.Put "AccessScript", True
>> IIsWebVDirObj.Put "AppIsolated",2
>>
>> IIsWebVDirObj.AppCreate2 1
>> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
>> IIsWebVDirObj.SetInfo
>>
>>
>>
>> Thanks
>> Kiran
>>
>>
>
>.
Did you have any asmx files in the Virtual folder? Additionally, What did
you mean "Dynamic discovery", "Browse to
Web services on the local machine " in VS.NET 2003?

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/s...ns/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Saturday, March 24, 2012

Web service problem

Hi all,

I have another question regarding webservices. I have one set up to access the active directory. As a test i have put in the following code as a method to see if it works.

[WebMethod(Description="Test function to test AD access")]
public string testFunction(string username, string pwd)
{
string testStr = string.Empty;
DirectoryEntry de = new DirectoryEntry("LDAP://DC=optos,DC=eye" ,username ,pwd);
foreach(DirectoryEntry child in de.Children)
{
testStr = testStr + "<BR>" + child.Name.ToString();
}

return testStr;
}

I have a similar piece of code on the form where i call the web service for, and this is where the problem lies.

The code runs fine on the form which calls the web service. When i call the web service however i get the following error:

<i>"Server was unable to process request. --> The specified domain either does not exist or could not be contacted"</i>

The security on the main form is set to impersonate=true and anonymous access has been removed from the IIS properties for the app. On the web service, again impersonte=true but this time anonymous is checked. When it is unchecked i get Access denied errors.

Does anyone have any ideas why this is happening.

Thanks,

GrantWeb services don't run under the context of the logged in user. They run under the context of the caller. This means that you will need to pass credentials to the web service.

http://support.microsoft.com/default.aspx?scid=kb;en-us;813834
Hi Mendhak,

That was a seriously quick response, thank you.

I'll look over the link and see if i can't get something working. I'll post back either way to let you know.

Cheers

Grant
Thanks Mendhak, that worked perfectly.

Thursday, March 22, 2012

web service returns blank page when invoking

Hi Everyone!

I am working on a project for a directed study class and am having
problems with webservices.

I have .NET Framework version 1.1.4322.573 with IIS and Frontpage
Extensions installed and Visual Studio 2003. These are all a fresh
install as I removed and re-installed to try and fix the problem to no
avail.

What Happens
============
In Visual Studio I can create a new Web Service project, say
WebService1, and all is created fine on IIS. I then open the default
file created by Visual Studio (service1.asmx) and uncomment the "Hello
World" web service.

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}

I can then browse to http://localhost/WebService1/s ervice1.asmx and
click the link for the web method HelloWorld. I then click the Invoke
button.
A new window opens and it is blank, there is nothing there. On 1 other
machine I have seen this work on campus where XML was returned with the
"Hello World" text in it, but not here. When I try to view source in
Internet Explorer the text for "Source" in the view menu is grayed out.

On 2 machines I have tried to get this to work and I get the same
result. I really do not know where to go.

I am writing an Instant Messenger app for C# and Web Services but I am
at a wall here where I can't move further until I can get the web
services to respond.

Thanks in advance for any help you can send my way!

-David R Underwood
drunderw AT presby.eduDid you rebuild the Web Service after making the change?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"David" <drunderw@.presby.edu> wrote in message
news:1122480013.517287.114680@.g43g2000cwa.googlegr oups.com...
> Hi Everyone!
> I am working on a project for a directed study class and am having
> problems with webservices.
> I have .NET Framework version 1.1.4322.573 with IIS and Frontpage
> Extensions installed and Visual Studio 2003. These are all a fresh
> install as I removed and re-installed to try and fix the problem to no
> avail.
> What Happens
> ============
> In Visual Studio I can create a new Web Service project, say
> WebService1, and all is created fine on IIS. I then open the default
> file created by Visual Studio (service1.asmx) and uncomment the "Hello
> World" web service.
> [WebMethod]
> public string HelloWorld()
> {
> return "Hello World";
> }
> I can then browse to http://localhost/WebService1/s ervice1.asmx and
> click the link for the web method HelloWorld. I then click the Invoke
> button.
> A new window opens and it is blank, there is nothing there. On 1 other
> machine I have seen this work on campus where XML was returned with the
> "Hello World" text in it, but not here. When I try to view source in
> Internet Explorer the text for "Source" in the view menu is grayed out.
> On 2 machines I have tried to get this to work and I get the same
> result. I really do not know where to go.
> I am writing an Instant Messenger app for C# and Web Services but I am
> at a wall here where I can't move further until I can get the web
> services to respond.
> Thanks in advance for any help you can send my way!
> -David R Underwood
> drunderw AT presby.edu
Thanks Kevin for your response. I rebuilt the solution and web service
and I also created a new blank web serivice project in Visual Studio
that was just the default "HelloWorld" web service. Neither will work.
Thanks!
Sorry to disappoint you, David, but I'm mystified. I can't think of a reason
offhand. You might try using the Debugger to step through the code when you
run it using F5.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"David" <drunderw@.presby.edu> wrote in message
news:1122481690.386850.307280@.g14g2000cwa.googlegr oups.com...
> Thanks Kevin for your response. I rebuilt the solution and web service
> and I also created a new blank web serivice project in Visual Studio
> that was just the default "HelloWorld" web service. Neither will work.
> Thanks!
There are no unusual debugging codes - no errors represented. The only
thing that shows up in the debugger is shown below:

Auto-attach to process '[2968] aspnet_wp.exe' on machine 'WEBDEV'
succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpress ions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regul arexpressions.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5 000.0__b03f5f7f11d50a3a\system.web.services.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.500 0.0__b03f5f7f11d50a3a\system.web.mobile.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\webservice1\7984f4c2\26c7a006\assembly\dl2\3 99d6382\f02f7441_d592c501\webservice1.dll',
Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system.data.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\webservice1\7984f4c2\26c7a006\wl0p5036.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temp orary asp.net
files\webservice1\7984f4c2\26c7a006\ibeem5u2.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded 'e72kt9_f',
No symbols loaded.
Ok so I decided to load it in Mozilla instead of IE and Mozilla
displayed it but with an error: At the top of the page it reads:

"This XML file does not appear to have any style information associated
with it. The document tree is shown below."

Below it is:
<string>Hello World</string
Post the source code from Mozilla.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"David" <drunderw@.presby.edu> wrote in message
news:1122487914.869168.251580@.g43g2000cwa.googlegr oups.com...
> Ok so I decided to load it in Mozilla instead of IE and Mozilla
> displayed it but with an error: At the top of the page it reads:
> "This XML file does not appear to have any style information associated
> with it. The document tree is shown below."
> Below it is:
> <string>Hello World</string
http://localhost/WebService1/Service1.asmx?WSDL
===========================================

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://tempuri.org/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence
<s:element minOccurs="0" maxOccurs="1"
name="HelloWorldResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
<wsdl:portType name="Service1Soap">
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
</wsdl:portType
<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" /
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address
location="http://localhost/WebService1/Service1.asmx" />
</wsdl:port>
</wsdl:service
</wsdl:definitions
Source from: http://localhost/WebService1/Service1.asmx/HelloWorld
================================================== ====

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">Hello World</string
Very odd. I copied and pasted this into NotePad, saved it as an XML file,
and opened it in IE, with no problems. Perhaps it is an IE setting that is
causing your problem.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"David" <drunderw@.presby.edu> wrote in message
news:1122489233.253537.143320@.g44g2000cwa.googlegr oups.com...
> Source from: http://localhost/WebService1/Service1.asmx/HelloWorld
> ================================================== ====
> <?xml version="1.0" encoding="utf-8"?>
> <string xmlns="http://tempuri.org/">Hello World</string
https://blogs.msdn.com/ie/archive/2.../25/421763.aspx

Apparently installing Netscape 8 will kill Internet Explorer's ability
to render XML. See the link above.

Thank you so very much for your help!! Have a great afternoon and God
bless!

-David

web service returns blank page when invoking

Hi Everyone!
I am working on a project for a directed study class and am having
problems with webservices.
I have .NET Framework version 1.1.4322.573 with IIS and Frontpage
Extensions installed and Visual Studio 2003. These are all a fresh
install as I removed and re-installed to try and fix the problem to no
avail.
What Happens
============
In Visual Studio I can create a new Web Service project, say
WebService1, and all is created fine on IIS. I then open the default
file created by Visual Studio (service1.asmx) and uncomment the "Hello
World" web service.
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
I can then browse to http://localhost/WebService1/s ervice1.asmx and
click the link for the web method HelloWorld. I then click the Invoke
button.
A new window opens and it is blank, there is nothing there. On 1 other
machine I have seen this work on campus where XML was returned with the
"Hello World" text in it, but not here. When I try to view source in
Internet Explorer the text for "Source" in the view menu is grayed out.
On 2 machines I have tried to get this to work and I get the same
result. I really do not know where to go.
I am writing an Instant Messenger app for C# and Web Services but I am
at a wall here where I can't move further until I can get the web
services to respond.
Thanks in advance for any help you can send my way!
-David R Underwood
drunderw AT presby.eduDid you rebuild the Web Service after making the change?
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
"David" <drunderw@.presby.edu> wrote in message
news:1122480013.517287.114680@.g43g2000cwa.googlegroups.com...
> Hi Everyone!
> I am working on a project for a directed study class and am having
> problems with webservices.
> I have .NET Framework version 1.1.4322.573 with IIS and Frontpage
> Extensions installed and Visual Studio 2003. These are all a fresh
> install as I removed and re-installed to try and fix the problem to no
> avail.
> What Happens
> ============
> In Visual Studio I can create a new Web Service project, say
> WebService1, and all is created fine on IIS. I then open the default
> file created by Visual Studio (service1.asmx) and uncomment the "Hello
> World" web service.
> [WebMethod]
> public string HelloWorld()
> {
> return "Hello World";
> }
> I can then browse to http://localhost/WebService1/s ervice1.asmx and
> click the link for the web method HelloWorld. I then click the Invoke
> button.
> A new window opens and it is blank, there is nothing there. On 1 other
> machine I have seen this work on campus where XML was returned with the
> "Hello World" text in it, but not here. When I try to view source in
> Internet Explorer the text for "Source" in the view menu is grayed out.
> On 2 machines I have tried to get this to work and I get the same
> result. I really do not know where to go.
> I am writing an Instant Messenger app for C# and Web Services but I am
> at a wall here where I can't move further until I can get the web
> services to respond.
> Thanks in advance for any help you can send my way!
> -David R Underwood
> drunderw AT presby.edu
>
Thanks Kevin for your response. I rebuilt the solution and web service
and I also created a new blank web serivice project in Visual Studio
that was just the default "HelloWorld" web service. Neither will work.
Thanks!
Sorry to disappoint you, David, but I'm mystified. I can't think of a reason
offhand. You might try using the Debugger to step through the code when you
run it using F5.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
"David" <drunderw@.presby.edu> wrote in message
news:1122481690.386850.307280@.g14g2000cwa.googlegroups.com...
> Thanks Kevin for your response. I rebuilt the solution and web service
> and I also created a new blank web serivice project in Visual Studio
> that was just the default "HelloWorld" web service. Neither will work.
> Thanks!
>
There are no unusual debugging codes - no errors represented. The only
thing that shows up in the debugger is shown below:
Auto-attach to process '[2968] aspnet_wp.exe' on machine 'WEBDEV'
succeeded.
'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.
dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.
dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.
dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.
dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f1
1d50a3a\system.web.regularexpressions.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f1
1d50a3a\system.web.regularexpressions.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\sy
stem.web.services.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.
drawing.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.
drawing.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\syst
em.web.mobile.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\asse
mbly\dl2\399d6382\f02f7441_d592c501\
webservice1.dll',
Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.dat
a.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.dat
a.dll',
No symbols loaded.
'DefaultDomain': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50
a3a\system.enterpriseservices.thunk.dll',
No symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\wl0p
5036.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\webservice1\7984f4c2\26c7a006\ibee
m5u2.dll', Symbols loaded.
'/LM/w3svc/1/root/WebService1-1-127669753379218750': Loaded 'e72kt9_f',
No symbols loaded.
Ok so I decided to load it in Mozilla instead of IE and Mozilla
displayed it but with an error: At the top of the page it reads:
"This XML file does not appear to have any style information associated
with it. The document tree is shown below."
Below it is:
<string>Hello World</string>
Post the source code from Mozilla.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
"David" <drunderw@.presby.edu> wrote in message
news:1122487914.869168.251580@.g43g2000cwa.googlegroups.com...
> Ok so I decided to load it in Mozilla instead of IE and Mozilla
> displayed it but with an error: At the top of the page it reads:
> "This XML file does not appear to have any style information associated
> with it. The document tree is shown below."
> Below it is:
> <string>Hello World</string>
>
http://localhost/WebService1/Service1.asmx?WSDL
========================================
===
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://tempuri.org/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="HelloWorldResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
<wsdl:portType name="Service1Soap">
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address
location="http://localhost/WebService1/Service1.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Source from: http://localhost/WebService1/Service1.asmx/HelloWorld
========================================
==============
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">Hello World</string>
Very odd. I copied and pasted this into NotePad, saved it as an XML file,
and opened it in IE, with no problems. Perhaps it is an IE setting that is
causing your problem.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
"David" <drunderw@.presby.edu> wrote in message
news:1122489233.253537.143320@.g44g2000cwa.googlegroups.com...
> Source from: http://localhost/WebService1/Service1.asmx/HelloWorld
> ========================================
==============
> <?xml version="1.0" encoding="utf-8"?>
> <string xmlns="http://tempuri.org/">Hello World</string>
>

Web services

Hi ,
I need a complete stuff related to webservices,plz send me related
stuff.Actually i don't know anything related to Web services.send me
the complete stuff from scratch
thanks
sureshCould you give a little more detail as to what you want it to be related to?
If you understand the basics of ASP.NET, it shouldn't be that tough to learn
the basics of webservices. They scared me at first, but once I read the
chapters on them in a great book someone showed me (ASP.NET Unleashed Second
Edition by Stephen Walther, let me know if you would like the ISBN number)
they didn't feel that different from writing the other stuff. I would
strongly suggest you get this book, it helped me learn almost everything I
know about ASP.NET without much trouble. I don't think anyone here can help
much until you give a little more detail on what you need.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Sukkius" <suresh.mtech@.gmail.com> wrote in message
news:1142865266.219486.324580@.u72g2000cwu.googlegroups.com...
> Hi ,
> I need a complete stuff related to webservices,plz send me related
> stuff.Actually i don't know anything related to Web services.send me
> the complete stuff from scratch
>
> thanks
> suresh
>

Web services

Hi ,

I need a complete stuff related to webservices,plz send me related
stuff.Actually i don't know anything related to Web services.send me
the complete stuff from scratch

thanks
sureshCould you give a little more detail as to what you want it to be related to?
If you understand the basics of ASP.NET, it shouldn't be that tough to learn
the basics of webservices. They scared me at first, but once I read the
chapters on them in a great book someone showed me (ASP.NET Unleashed Second
Edition by Stephen Walther, let me know if you would like the ISBN number)
they didn't feel that different from writing the other stuff. I would
strongly suggest you get this book, it helped me learn almost everything I
know about ASP.NET without much trouble. I don't think anyone here can help
much until you give a little more detail on what you need.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/

"Sukkius" <suresh.mtech@.gmail.com> wrote in message
news:1142865266.219486.324580@.u72g2000cwu.googlegr oups.com...
> Hi ,
> I need a complete stuff related to webservices,plz send me related
> stuff.Actually i don't know anything related to Web services.send me
> the complete stuff from scratch
>
> thanks
> suresh

Monday, March 12, 2012

Web Services Encryption

I am becoming familiar with the standards and practices of secure Web
Services, particularly encrypting the messages with Tokens. What I don't
understand, and I can't find in documentation, is what type of encryption is
used with the tokens, and how the key(s) are passed from the client to the
service to decrypt the message. I need to know this so I can be assured
that an intercepted message cannot be decrypted just by using the
information in the message itself.I think for the tokens it leverages the same methods as XML
Encryption. Therefore, AES 128/192/256 and triple DES...
Check out:
Algorithms:
http://www.w3.org/TR/xmlenc-core/#sec-Algorithms
Spec:
http://www-106.ibm.com/developerwor...rary/ws-secure/
On Wed, 8 Sep 2004 13:30:36 -0700, "Random" <cipherlad@.hotmail.com>
wrote:

>I am becoming familiar with the standards and practices of secure Web
>Services, particularly encrypting the messages with Tokens. What I don't
>understand, and I can't find in documentation, is what type of encryption i
s
>used with the tokens, and how the key(s) are passed from the client to the
>service to decrypt the message. I need to know this so I can be assured
>that an intercepted message cannot be decrypted just by using the
>information in the message itself.
>
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com
Check out our advanced .NET zip file and compression library
Email: xLeblancA@.xceedsoft.com (remove the first 'x')

Web Services Encryption

I am becoming familiar with the standards and practices of secure Web
Services, particularly encrypting the messages with Tokens. What I don't
understand, and I can't find in documentation, is what type of encryption is
used with the tokens, and how the key(s) are passed from the client to the
service to decrypt the message. I need to know this so I can be assured
that an intercepted message cannot be decrypted just by using the
information in the message itself.I think for the tokens it leverages the same methods as XML
Encryption. Therefore, AES 128/192/256 and triple DES...

Check out:

Algorithms:
http://www.w3.org/TR/xmlenc-core/#sec-Algorithms
Spec:
http://www-106.ibm.com/developerwor...rary/ws-secure/

On Wed, 8 Sep 2004 13:30:36 -0700, "Random" <cipherlad@.hotmail.com>
wrote:

>I am becoming familiar with the standards and practices of secure Web
>Services, particularly encrypting the messages with Tokens. What I don't
>understand, and I can't find in documentation, is what type of encryption is
>used with the tokens, and how the key(s) are passed from the client to the
>service to decrypt the message. I need to know this so I can be assured
>that an intercepted message cannot be decrypted just by using the
>information in the message itself.

--
Alex Leblanc
Xceed Software Inc.
http://www.xceedsoft.com

Check out our advanced .NET zip file and compression library

Email: xLeblancA@.xceedsoft.com (remove the first 'x')