Accessing webservice with Compact Framework with "credentials"

  • Thread starter Thread starter Mike Dole
  • Start date Start date
M

Mike Dole

I am working on an application using the compact framework.
This app calls a webservice on my develop machine to make some SQL
queries to an oracle database and this is working really well.

But here's the thing: I want to get rid of the 'anonymous access' in
IIS because it involves some update statements.

The minute I remove 'anonymous access' however, I get a 401 exception
(Unauthorized)!


I have the following in my web.config:
<authentication mode="Windows" />

<allow users="mydomain\myuser"/>
<deny users="*"/>

"I've tried <identity impersonate="true"/> in the web.config?"


And the following piece of code in the CF application

Public Shared credentials = New NetworkCredential("myuser",
"mypassword", "mydomain")

Also tried it with
("(e-mail address removed)", "mypassword", "mydomain")
(mydomain\myuser", "mypassword", "mydomain")

Dim objService As WS.OracleService = New WS.OracleService
objService.Credentials = credentials

I've set the Network ID on the handheld to use the username and
password +
domain but still no success...

In IIS - Verification: Integrated's selected Basic's not
(Realm=mydomain)
The IIS machine is a 'client', don't know if that makes a difference?

I guess there must be something wrong, if only...

Thanks in advance

Mike

[This is a crossposting from microsoft.public.dotnet.framework.aspnet.webservices]
 
I believe NTLM (Windows authentication) is not supported by CF.

--
Alex Yakhnin, NET CF MVP
IntelliProg, Inc.
http://www.intelliprog.com

Mike Dole said:
I am working on an application using the compact framework.
This app calls a webservice on my develop machine to make some SQL
queries to an oracle database and this is working really well.

But here's the thing: I want to get rid of the 'anonymous access' in
IIS because it involves some update statements.

The minute I remove 'anonymous access' however, I get a 401 exception
(Unauthorized)!


I have the following in my web.config:
<authentication mode="Windows" />

<allow users="mydomain\myuser"/>
<deny users="*"/>

"I've tried <identity impersonate="true"/> in the web.config?"


And the following piece of code in the CF application

Public Shared credentials = New NetworkCredential("myuser",
"mypassword", "mydomain")

Also tried it with
("(e-mail address removed)", "mypassword", "mydomain")
(mydomain\myuser", "mypassword", "mydomain")

Dim objService As WS.OracleService = New WS.OracleService
objService.Credentials = credentials

I've set the Network ID on the handheld to use the username and
password +
domain but still no success...

In IIS - Verification: Integrated's selected Basic's not
(Realm=mydomain)
The IIS machine is a 'client', don't know if that makes a difference?

I guess there must be something wrong, if only...

Thanks in advance

Mike

[This is a crossposting from
microsoft.public.dotnet.framework.aspnet.webservices]
 
Back
Top