Access NAV webservice from IIS site with given credentials ?

bastir
Member Posts: 27
Hi,
following situation:
Server1 : SQL-Server, Service-Tier, IIS
Server2: my local Device
I've developed a small asp.net website that takes some url parameters and passes them to the webserver.
The site is authenticating to the webservice via given/stored credentials, that are stored in the web.config or any other file.
It workes great locally on Server2 (my dev-environment), so I published the site to a new virtual site on Server1.
On Server2 I'm facing a "401 - Unauthorized" Error from the webservice. The website is displayed correct and gives me back the message via try/catch.
I've tried almost everything and googled really a lot, but cannot reach my aim, that the user can open the website as anonymous user and the website is communicating to the webserver via fixed credentials.
One of my tried method to provide the user/pwd is:
Have anybody faced such a problem again or has some codesnipped or tipps for configuring IIS correctly.
following situation:
Server1 : SQL-Server, Service-Tier, IIS
Server2: my local Device
I've developed a small asp.net website that takes some url parameters and passes them to the webserver.
The site is authenticating to the webservice via given/stored credentials, that are stored in the web.config or any other file.
It workes great locally on Server2 (my dev-environment), so I published the site to a new virtual site on Server1.
On Server2 I'm facing a "401 - Unauthorized" Error from the webservice. The website is displayed correct and gives me back the message via try/catch.
I've tried almost everything and googled really a lot, but cannot reach my aim, that the user can open the website as anonymous user and the website is communicating to the webserver via fixed credentials.
One of my tried method to provide the user/pwd is:
CredentialCache cache = new CredentialCache(); cache.Add(new Uri(service.Url), // Web service URL "NTLM", // Kerberos or NTLM <= I used Negotiate, too new NetworkCredential(pUser, pPassword, pDomain)); service.Credentials = cache;
Have anybody faced such a problem again or has some codesnipped or tipps for configuring IIS correctly.
0
Comments
-
The problem could be SPNs... check it by DelegConfig v2 to be sure that it will work.0
-
hi, did the spns resolve this problem ?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions