[IIS]Unauthorized Access to WebServices from a WebSite

kizin
Member Posts: 18
Hi,
I develop a webSite which using Nav 2009 WebServices.
When i'm using the web server provided by Visual Studio my web web site works. But When i published this Website on a IIS Server, i got the following error : "The request failed with HTTP status 401: Unauthorized".
The configuration is
- Windows XP fr
- IIS 6.0
- Nav 2009
I use the following code :
Administrateur is the loggued user who gets SUPER rights in Nav2009.
I've tried to put Windows authentification in IIS Authentifcation method and "service.UseDefaultCredentials = false;" but it does not work either.
Thanks,
Yann
I develop a webSite which using Nav 2009 WebServices.
When i'm using the web server provided by Visual Studio my web web site works. But When i published this Website on a IIS Server, i got the following error : "The request failed with HTTP status 401: Unauthorized".
The configuration is
- Windows XP fr
- IIS 6.0
- Nav 2009
I use the following code :
NavWSAchat.WSAchat_Service service = new NavWSAchat.WSAchat_Service(); service.Url = WS_URL; service.UseDefaultCredentials = false; //service.Credentials = new System.Net.NetworkCredential("Administrateur", "password", "XP-NAV2009"); service.Credentials = new System.Net.NetworkCredential("Administrateur", "password");Authentification Method for IIS is Anonymous.
Administrateur is the loggued user who gets SUPER rights in Nav2009.
I've tried to put Windows authentification in IIS Authentifcation method and "service.UseDefaultCredentials = false;" but it does not work either.
Thanks,
Yann
0
Comments
-
If you leave out this code and just have a simple website - then you don't get any error right? (excludes IIS configuration errors)
A couple of questions
Is the IIS Server on a different box than your Service Tier?
Is SQL Server on a third box?
Have you tried opening the Web Service URL in a browser from the IIS Server?Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
If you leave out this code and just have a simple website - then you don't get any error right? (excludes IIS configuration errors)Is the IIS Server on a different box than your Service Tier?Is SQL Server on a third box?
All is on the same machine.Have you tried opening the Web Service URL in a browser from the IIS Server?
- I have opened the web service Url in IE on the Server and it works.
Thx a lot.0 -
I have found the following with the webpages: adding a gridview to the asp webpage, I did not use the UI to bind the datasource. Instead I used:
Dim CallListService As New CallList_REF.Call_List_Service Dim CallList As New CallList_REF.Call_List Dim filters As New List(Of CallList_REF.Call_List_Filter) Dim idFilter As New CallList_REF.Call_List_Filter idFilter.Field = CallList_REF.Call_List_Fields.Call_ID idFilter.Criteria = "" filters.Add(idFilter) DataList1.DataSource = CallListService.ReadMultiple(filters.ToArray, Nothing, 100)
Which assigns the datasource, but I have no idea on how to display my datalist?Kind Regards,
Ewald Venter0
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