473,412 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

403: Access Forbidden

hello,

i am working on my first web service project. i am writing a webpage
that consumes a ws from one of our partners, so i do not have access to
the ws code itself. this partner uses certificates for security. the
steps they gave me to access it are:
1) run wsdl.exe on the "webservice.wsdl" given to me
2) compile the resulting .CS proxy class into a .DLL assembly
3) add this to my project's References section

4) install the .PFX certificate given to me by double-clicking it,
input password
5) go into IE (or Control Panels -> Internet Options) and go to Content
tab, Certificates...
6) click on the newly installed cert and Export, doing so as a DER
X.509 ".CER" file
7) do the following in my app code:

//load up the .cer
X509Certificate cert =
X509Certificate.CreateFromCertFile(@"c:\temp\test. cer");

//attach the cert to my proxy class ws object
ws.ClientCertificates.Add(cert);

//app authentication for proxy object
ws.Credentials = new NetworkCredential("[name]", "[password]");

//use webservice
bool result = ws.ValidateCustomer(customerID);

....however, when i run any of the ws methods, i get a 403 error:

The request failed with HTTP status 403: Access Forbidden.

....according to my IT contact at the partner, he said their logs report
i am failing at the web server level, and am not even reaching the
application's authentication (the NetworkCredential entry). he
indicated this is due to a problem w/ my certificate.

he also said other clients are using it, and provided me w/ a secure
test-form URL that uses the service. i am able to access the URL on
their secure site, so i know it works and apparently my certificate
works (IE asks me if i want to use the installed cert, i say Yes, i get
in and can run the form).
now i am stuck. i have granted ASPNET access to the .cer file, nothing.
have also farted around with the WinHttpCertCfg command line util,
running:

winhttpcertcfg -i webservice.pfx -p [password] -c LOCAL_MACHINE\my -a
aspnet

....which i see puts in entries to "C:\Documents and Settings\All
Users\Application Data\Microsoft\Crypto\RSA\MachineKeys". no use.
obviously, im not a certificate expert. any help would be
appreciated...
thanks!
matt

Nov 23 '05 #1
2 6064
i am now able to successfully run the costco webservice in my C#
ASP.NET test project. there were two changes i made on my end:

1) installed .NET Framework 1.1's service pack (the 1.1 release has
it's own SP1), which cites updates to webservices, security, and
certificates. this did not immediately fix my problem... so it may not
be related.

2) added the Certifcates snap-in for the MMC windows management
utility, and using it to delete my certs, re-add the .PFX into the
"Personal" store, then exporting it to a .CER all w/ the MMC snap-in
(and not using Control Panels -> Internet Settings or IE).

works. but i should really test further to establish which of the two
fixed it... im leaning towards #2.. i read in some other places people
said it was better to let MMC manage the store settings set it properly
sets rights.

but who knows, maybe it was both. if i have time ill test it on another
box.

Nov 23 '05 #2
tested on another machine -- it was using MMC.

the other machine did not have 1.1 SP1 installed, had the same problem
as my machine when installing the certificate just by double-clicking
the .PFX. however, after using MMC's snap-in, importing the .PFX, then
exporting the .CER, i had no trouble.
matt

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oleg Konovalov | last post by:
Hi, I am trying to create 2 separate environments (dev and test) on one powerful Unix server which has 2 network cards, 2 IP addresses, 2 server names... Using Apache 2.0.43 and Tomcat...
0
by: Layne L via DotNetMonster.com | last post by:
Trying to install a .NET application on a Windows 2003 Server ( .NET v1.1) and for any . aspx file get the following error: 403.1 Forbidden: Execute Access Forbidden The application has...
1
by: DotNetter | last post by:
I have two computers. Both computers have Windows 2003 installed as well as Visual Studio.Net 2003 installed. Computer A has active directory set and also has .Net and the webservice called...
3
by: JerryK | last post by:
Hi, I have an ASP.net page, written in VB.net. In that code I want to access a validator web services that is secured via SSL. I have installed the certificate, via a .pfx file, on the system....
2
by: Edward Low | last post by:
Hi all, When creating a virtual directory in IIS 5.0 win xp Pro with the name like "abc.com", an error HTTP 403.1 Forbidden: Execute Access Forbidden will return when accessing the web page. But,...
1
by: PK9 | last post by:
I am receiving the following error in Visual Studio 2003: "the web server reported the following error when attempting to create or open the web project HTTP/1.1 403 Access Forbidden" I am...
3
by: Shamresh | last post by:
Hi to all, I have a web service that is hosted on IIS 5.1. I have found that the web service works as expected but after about 20 mins of no calls to the web service, a call that worked earlier...
6
by: Doug Ferguson | last post by:
I am using a webservice client that was created from a WSDL file in .Net 1.1. The client ALWAYS works the first time I call it. The second call returns one of two exceptions. It either returns...
1
by: John Nagle | last post by:
I just discovered that the "robotparser" module interprets a 403 ("Forbidden") status on a "robots.txt" file as meaning "all access disallowed". That's unexpected behavior. A major site...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.