473,394 Members | 1,946 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,394 software developers and data experts.

Security of Web Services

I met the security problem.
I have developed the form based security for ASP.NET appliation. However, it
seems that my window based client for my Web services application can not
access to the server side. How to overcome this situation?

Thanks

David
Nov 19 '05 #1
13 1290
You need to explain more here ...

"david" <da***@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
I met the security problem.
I have developed the form based security for ASP.NET appliation. However,
it
seems that my window based client for my Web services application can not
access to the server side. How to overcome this situation?

Thanks

David

Nov 19 '05 #2
1. I have developed the form based security for authentication in IIS web
server.
2. My ASP.NET server application uses it for client access authentication
(web browser).
3. Now I add a web services (.asmx) item to the project.
4. Created a window form based client to this web service.
5. Without security restriction, it works fine.
6. With the form based security, the windows forms client can not access to
the server (since there is no logon window popup for loginname/password).

David

"Annie" wrote:
You need to explain more here ...

"david" <da***@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
I met the security problem.
I have developed the form based security for ASP.NET appliation. However,
it
seems that my window based client for my Web services application can not
access to the server side. How to overcome this situation?

Thanks

David


Nov 19 '05 #3
Hi,

With forms authentication you can configure the application so that
only certain files/folders require authentication. I would create two
folders under my application and put all of the secure stuff in one
folder and the unsecure stuff (e.g., your web service) in the other
folder. Then you can use the following to only secure the "secure"
folder, for example.

<authentication mode="Forms">
<forms loginUrl="logon.aspx" name="cookie" timeout="60"
path="secure/">
</forms>
</authentication>

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Nov 19 '05 #4
Web services will require some other authentication scheme. Either use IIS
to do this or build in your own custom SOAP headers that pass that authentication
information and you do the check manually in each SOAP call.

-Brock
DevelopMentor
http://staff.develop.com/ballen
1. I have developed the form based security for authentication in IIS
web
server.
2. My ASP.NET server application uses it for client access
authentication
(web browser).
3. Now I add a web services (.asmx) item to the project.
4. Created a window form based client to this web service.
5. Without security restriction, it works fine.
6. With the form based security, the windows forms client can not
access to
the server (since there is no logon window popup for
loginname/password).
David

"Annie" wrote:
You need to explain more here ...

"david" <da***@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
I met the security problem.
I have developed the form based security for ASP.NET appliation.
However,
it
seems that my window based client for my Web services application
can not
access to the server side. How to overcome this situation?
Thanks

David

Nov 19 '05 #5
Brock is correct in that web services are not authenticated using forms
authentication. However, if you have web services in an application
that uses forms authentication, but the web services do not require
authentication, you can still use forms authentication to allow access
to the asmx while keeping web forms authenticated. All you have to do
is put the web services in a public folder and use the <location> tag
to control/allow access.

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...3/qid=11263614...

Nov 19 '05 #6
oops...you actually have to use the <location> tag to control access to
secured/unsecured folders (paths). You can't do that using the <forms>
tag with the "path" attribute.

Thanks,
Sayed Y. Hashimi
http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...3/qid=11263614...

Nov 19 '05 #7
It seems that Web form Form based authentication will not work for windows
form based client of web services.

Currently, my web application and Web services are in the same folder.
I think that my web services have to have authetication to allow the access
only for legitimate users. Do I need to develop other authentication system?

Dabin
"ha**********@gmail.com" wrote:
Brock is correct in that web services are not authenticated using forms
authentication. However, if you have web services in an application
that uses forms authentication, but the web services do not require
authentication, you can still use forms authentication to allow access
to the asmx while keeping web forms authenticated. All you have to do
is put the web services in a public folder and use the <location> tag
to control/allow access.

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...3/qid=11263614...

Nov 19 '05 #8
Thanks.

It seems that the web form based authentication does not work for the
windows form based web services clients.

I need to have authentication system to verify the client access to web
services. Do I need to develop other authentication system?

David

"ha**********@gmail.com" wrote:
Brock is correct in that web services are not authenticated using forms
authentication. However, if you have web services in an application
that uses forms authentication, but the web services do not require
authentication, you can still use forms authentication to allow access
to the asmx while keeping web forms authenticated. All you have to do
is put the web services in a public folder and use the <location> tag
to control/allow access.

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...3/qid=11263614...

Nov 19 '05 #9
This is exactly what I used.

Problem is that my client is windows form based application for web services.
So the web logon form can not pop up.

David

"ha**********@gmail.com" wrote:
Hi,

With forms authentication you can configure the application so that
only certain files/folders require authentication. I would create two
folders under my application and put all of the secure stuff in one
folder and the unsecure stuff (e.g., your web service) in the other
folder. Then you can use the following to only secure the "secure"
folder, for example.

<authentication mode="Forms">
<forms loginUrl="logon.aspx" name="cookie" timeout="60"
path="secure/">
</forms>
</authentication>

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Nov 19 '05 #10
Hi,

In that case, you have to go with what Brock said earlier. That is, web
services can be secured by using either IIS or SOAP level security.
SOAP is the way to go, if you ask me. Here are a few links to get you
going with both of the above approaches:

1) IIS Authentication/Authorization-
http://msdn.microsoft.com/library/de...l/secmod85.asp

2) SOAP Authentication/Authroization-
http://msdn.microsoft.com/msdnmag/is...rvicesecurity/

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Nov 19 '05 #11
Just to add to this, I'd suggest making your ASMX SSL only.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

In that case, you have to go with what Brock said earlier. That is,
web services can be secured by using either IIS or SOAP level
security. SOAP is the way to go, if you ask me. Here are a few links
to get you going with both of the above approaches:

1) IIS Authentication/Authorization-
http://msdn.microsoft.com/library/de...ry/en-us/secmo
d/html/secmod85.asp
2) SOAP Authentication/Authroization-
http://msdn.microsoft.com/msdnmag/is...rvicesecurity/
Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com

Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0

http://www.amazon.com/exec/obidos/tg.../qid=112636142
1/sr=1-1/ref=sr_1_1/102-5068238-6758524?v=glance&s=books

Nov 19 '05 #12
Hi,

Your original post give me the indication that you had a web
application that had some web pages that needed to be secured and that
you had a web service which did not require
authentication/authroization. The solution I proposed allows you to
have a bunch of secured pages with an unsecured web service in the same
application using forms authentication. Now, if you really need
authentication/authorization for your web services, then you have to
use either IIS or apply credentials to the SOAP messages (possibly
using WSE).
Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Nov 19 '05 #13
Hi Sayed,

I am also very new to ASP.NET. My problem is how to configure web.config
file in forms authentication. I have user and Manager as a role in my
tbl_Login in my SQL Server.

If roles = Manager then I want them to redirect them into
...../secure/manager/mmain.aspx

and if the role = user then I want them to redirect to
...../secure/user/umain.aspx

I am using VB.NET and I have created many application with login form in
windows base application. I store user name and password as encryptred
(varbinary in SQL Server).

But I don't know how to achive samething in ASP.NET.

Is it possible to help me how to configure my web.config file as well as how
to code in code-behind pages? If yopu don't have time to provide any
information could you be willing to provide me some link so I can study
myself?

Thank you very much.

Rgds,
GC

"ha**********@gmail.com" wrote:
Hi,

Your original post give me the indication that you had a web
application that had some web pages that needed to be secured and that
you had a web service which did not require
authentication/authroization. The solution I proposed allows you to
have a bunch of secured pages with an unsecured web service in the same
application using forms authentication. Now, if you really need
authentication/authorization for your web services, then you have to
use either IIS or apply credentials to the SOAP messages (possibly
using WSE).
Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Dec 6 '05 #14

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

Similar topics

2
by: James | last post by:
I'm currently using a basic web service for my Windows and web clients to access a Microsoft Access database on the web server. All works fine, but I'm worried about security. Without any...
4
by: Ashish | last post by:
Hi Guys I am getting the following error while implementing authentication using WS-security. "Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated...
1
by: Tom | last post by:
Hi, I am currently on a project where one site needs to send the user credentials to another site, through web services. Scenario: * "User 1" will authenticate to "Site A" using NTLM ("Site...
2
by: Greg | last post by:
Please note: I have cross posted this from Newsgroup: microsoft.public.dotnet.framework.aspnet.webservices with a few minor changes... I am having a simple problem setting up the security on my...
7
by: Magdelin | last post by:
Hi, My security team thinks allowing communication between the two IIS instances leads to severe security risks. Basically, we want to put our presentation tier on the perimeter network and the...
0
by: SD | last post by:
Hi, I have an assembly (.exe) started at logon of each computer of my company and for each user. (Through PDC scripts) This assembly use web services in order to request any informations. ...
2
by: Ronald S. Cook | last post by:
Hi, Some users on our domain can run our WCF application no problem. Some get an unhandled exception error re: SOAP security negotiation. I'm wanting the service to not be secure.. I just want...
2
by: =?Utf-8?B?ZDcyZTRk?= | last post by:
I'm trying to increase the MaxClockSkew for our WCF bindings through code in my service host and client. From various forums etc, I have got this far: public static void...
1
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi I am creating a web service PreprocessingService with IIS Hosting and transport layer security with user name and password. I created a self-signed certificate IISHost in IIS which is issued...
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.