|
-
December 5th, 2006, 12:46 AM
#1
Prevent outside world from using asmx file
I have a webservice that I developed using VS2005. I then created a front end application that will make calls to the asmx page.
The webservice (asmx file) has many functions that are proprietary and i would only like them to be called by MY front end application. However, in order to make calls to the asmx file, I have to publish the asmx file to a public location... Lets say http://myservice.mydomain.com/subdir/mywebservice.asmx.
Now how do I keep other people from accessing this webservice while still allowing my front end app to access it?
-
December 5th, 2006, 01:56 AM
#2
Re: Prevent outside world from using asmx file
If you need some kind of security in your webservice then you will have to implement authentication in th web service itself. This way only those users will be able to access the webservice who are authorized to do so.
Read some stuff on autherntication here
http://www.google.co.in/search?hl=en...tication&meta=
-
December 5th, 2006, 01:07 PM
#3
Re: Prevent outside world from using asmx file
You could create the web service in your webapp if only this webapp can call the web service, so the web service and the webapp use the same authentication rule.
-
December 5th, 2006, 01:13 PM
#4
Re: Prevent outside world from using asmx file
I realized that I had "Enable Anonymous Access" turned ON in IIS mgr. This was allowing any Tom, ****, and Harry to run my asmx via the anonymous IUSR_MACHINENAME acct.
After doing that I realized that even my front end app had been blocked. So I instansiate my webservice from my front end app using the following code...
Code:
TestServer.Service svc = new TestService.TestServer.Service();
svc.Credentials = new System.Net.NetworkCredential("goodUserName","goodPassword","myDomain.com");
lblTest.Text = svc.RunTest();
Is this ok?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|