Web Service Security Set Up

Sep 27, 2011

I am learning web service from [URL]

I created a new project and copied code from above link as below, it works.

But once change webmethod to use SQL table, I got "Can not load WSDL" error.

Code:
Imports System
Imports System.Web.Services

Public Class TempConvert :Inherits WebService

[CODE]...

View 8 Replies


Similar Messages:

Security :: Login Contols And A Web Service - Web Service To Do The Membership Authentication And Authorization?

Jan 23, 2010

I am writing two ASP.NET apps. One is a web service that provides xml data and the other is a web client that will use the service to display and manipulate data. I would like for the web service to do the membership authentication and authorization. Is there any way to simply point the login controls in my client application to the web service instead of to a database. I assume I would have to provide the necesarry methods in my web service interface, which would then use the membership provider database I created and pass the results back through to the client.

Is this possible? I have seen many articles on security provisioin from a web service but none has really been what I am looking for. I was hoping that, since my service and my client are both written in ASP.NET, there might be some built functionality that would benefit me.

View 8 Replies

Security :: Webservice Security And Windows Authentication - Invoke SSIS Packages From Web Service

Dec 15, 2010

I have to invoke SSIS packages from web service in the most secure way. I think that windows authentication will be secure but i am not sure. I do not have much knowledge about how to achieve this and the information on the internet is very distributed.

View 1 Replies

Security :: Login Form Rejecting Valid Login With Forms Based Security And Membership Service

Jan 21, 2010

I've set up a system with forms based authentication and using the asp:Login control. When I put in an invalid password I get the approriate invalid password message. However when I put in a valid password, it does nothing...just returns to the login page again. I'm triple checked the login info. There is no error message, and the invalid attempts counter doesn't increment. When I put a break point in the Login_LoggedIn event of the Login form, it hits it, but User.Identity.IsAuthenticated is false. I'm not 100% sure it should be true at this point, as I'm pretty new to .NET but it seems kind of odd.

My user database is stored in a sqlserver 2005 db that already existed. I've added a new connection for it.In the authorization I have

<authorization>deny
users="?"/><authorization>

View 2 Replies

C# - Security On A WCF Public Web Service

Nov 19, 2010

I'm building a complex, public web service in WCF that send email to a specific address, similar to a contact form but with some features.With jQuery I get the data from the textbox and with Ajax and json I send to the web service the strings to proceed at the send.

Now, is there a good way to make it secure?

I mean.. the service is public so someone can have access to it and starting to spam on this address. Can I restrict the users to use the web service only from the correct web site?

View 2 Replies

Security :: Unable To Create Web Service In IIS

Nov 24, 2010

I'm having VS 2008 and OS vista. When I try to create a web service in IIS it gives me a error tht I shud run the VS 2008 as admin then create a web service. When I run as admintrator and create the web service then no problem. Is it possible to create the web service without running as administrator?

View 6 Replies

Security :: Random Exception In A Web Service?

Jan 5, 2010

I'm getting this exception randomly in one webservice, it used to happen in the first call only, and in the second calls and so on it works fine ... and after a while without use the webservice it happens again. It seems to be that when the AppDomain is not loaded, the first time fails... and subsequent calls are ok; when IIS shutdown the AppDomain... the next call will fail again.

[code]....

View 4 Replies

Security :: 401 Web Exception While Accessing A Service?

Jul 2, 2010

I have added a service from a Win2003 server to my Visual Studio project on WinXP machine. Create an oject for this service went OK. But when I tried to run a method in the service I get "401 web exception while accessing a service.".

How to proceed?

View 1 Replies

Security :: How To Provide Credentials To A Web Service

Apr 12, 2010

have been facing a problem in passing credentials to a web service. I have searched a lot on it and found solution but they didn't work for me coz the scenario with me little different I believe.The situation is like this. I have a 3rd party web service "https://3rdpartyserver/virtualdirectroy/service/service.aspx".So when I try to browse the service in IE it takes me to the login page ("https://3rdpartyserver/virtualdirectroy/Loginpage.aspx"), when I enter usename and password in it and hit Log In button it takes me to the service where all the web methods are listed

View 3 Replies

Security :: How To Add Digital Signature On Two Web Service

Feb 24, 2010

I have never write code like this... so I am trying to explian what problem I meet here..

assuming I have 2 web service

one named WS1 another named WS2

WS1 (send data to WS2) → WS2 then WS2 (receive data from WS1 and do something then return result to WS1)→WS1

if I want to add digital signature between WS1 and WS2 so that WS1 connecting to WS2 , WS2 will recognize who is connecting by digital signature

what do I need if I want to do that? and how to do?

View 2 Replies

Security :: Using A X509 Certificate In A Web-service

Jun 17, 2010

I have a rather strange situation that I am in.

I have to write a web-service that will (among other things) communicate with another web service. When we communicate with that remote web-service we are required to use a certificate that they provided.

I am having a really hard time trying to find any sample code that does this.

I have found code for installing certs when you want to use a browser to communicate, but none when you are using a web-service to web-service and you are required to HAVE the certificate, not requiring the OTHER end to have the certificate.

So far I cannot even find code to allow me to parse throught the cert store. Samples I found online show up as errors in Visual Studio 2005.

Note: This is running one Windows 2000, designed with Visual Studio 2005, asp.net 2.0

View 1 Replies

Security :: Custom Authentication With WCF Service?

Aug 11, 2010

I have created a WCF service that will serve as authentication service for Silverlight client.The problem is that when I make a call to FormsAuthentication.SetAuthCookie in the Login method below, I get a null reference exception. I am following the 'Securing Applications Built on Silverlight and WCF' (http://www.componentart.com/community/blogs/milos/archive/2009/05/07/securing-applications-built-on-silverlight-and-wcf.aspx)

[Code]....

View 1 Replies

Security :: WCF Service Hosting With Certificate

Dec 14, 2010

Keyset does not existDescription:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Security.Cryptography.CryptographicException: Keyset does not existSource Error:

[Code]...

View 1 Replies

Security :: Impersonation In Exchange Web Service API

Apr 9, 2010

I have a service account SvcAcc to manage contacts (add/update/delete contacts) for all the exchange users. I Impersonate using the below cmdlet to manage contacts but it also allows SvcAcc to perform other functions (such as send email etc) on behalf of the user.

cmdlet
New-ManagementRoleAssignment -Name:impersonationAssignmentName -Role:ApplicationImpersonation -User:serviceAccount
//impersonation code
service.Credentials = new NetworkCredential(ServiceAccountUserName, ServiceAccountPassword, domain);
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, userEmail);

View 3 Replies

Security :: Form Authentication In A Web Service?

Dec 4, 2010

I want to create a web service that can authenticate user from my application. I will be sending user name and password from my app to the web service and that will deny or accept the user. I want to use form authentication using sql server. that this web service can be used by other team in my office so that they can just call the web service and the user will be authenticated.

Also, is it possible to use both form and windows authentication in my web service and authenticate the user both ways.

View 3 Replies

Security :: Authentication When Web Service Is Being Request?

Feb 10, 2010

I am using .NET roles and membership model to manage user accounts in my system back-end.

If the request is come from within my web-app, I can authenticate through form.

But if the user is requesting from else where, maybe their own apps, how to I do authentication?

attach username and password (GET/POST) and then secure the line by SSL? is that what I should do?

View 3 Replies

Security :: .NET Membership Within A Windows Service App?

Jan 5, 2011

I have a web application that uses a SQL database which contains all the standard asp membership tables.Within my Web application I use the standard asp.net membersip logic for adding new users, roles, etc...The point here is I dont use any custom providers for anything.Now on that same machine that is hosting my web application I am writing a Windows service in c# .net.As part of one of the method calls to the windows service application I was curious if I would be able to use any type of membership classes that would connect to my existing database and perform the same functionality as does the ASP.NET membership classes.

View 1 Replies

Security :: Web Service Can't Find Registry Sub Key?

Feb 15, 2010

I have a .Net web service which is being relocated onto a Windows 7 machine running IIS 7.I have set up an application under the default web site and pointed it to the correct location, however when I try to execute a call to the web service, I get a message as follows:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.ArgumentException: Registry SubKey softwareardexconnections.net not found.

In the past when I had this error, all that has been required to fix it is to set the permissions on that registry sub key to allow read access to the anonymous IIS user. I have given the Everyone group Full Control of this sub key in an attempt to get it working but I still get the same error.This is my first experience with Windows 7 and IIS 7 and it seems quite a bit has changed, so I'm probably missing something.

View 4 Replies

Security :: Validating A Session ID Using A Web Service?

May 13, 2010

I have a web site that streams on demand video content. The video content is stored and delivered from a seperate SMD platform. My website submits a url request to the media server in order to get the media to display. My user session data is held in a sql server database on another seperate server.

I think the best way for me to do this is to create a web service that can validate a session id. So when I create the url on my web site I include the encrypted session id. The media server then sends this encrypted token to my web service which in turns decrypts the token and validates the session id against my database and then returns whether valid or not which is used to check if the content can be displayed.

View 2 Replies

Security :: Using Membership Services Through Web Service?

Sep 13, 2010

Is there any way to use Asp.net's membership services through a web service? My boss, for some reason, wants this...

View 1 Replies

Security :: Can Use The Membership Provider Api On A Hosted Service

Oct 16, 2010

Can I use the membership provider api on a hosted service? I can create mssql databases but have no control over iis. Will I be able to use the membership admin webpage on the hosted service?

Am I correct in stating that the api uses ASPNETDB.MDF in the app_data folder as it's database?

View 2 Replies

Security :: Login User Into Windows From The Service

Nov 22, 2010

Is it possible to remotly login into Windows using ASP? What I'm trying to accomplish is, that I could remotly call a ASP page on my server (Apache on Win Vista) that logs in a user on that system. For example remotly I start a Wake-On-Lan to start the computer (server). It boots up to the user login screen where I would have to enter my password to login to the desktop. Because the service is already running at that time, I would like to open a ASP page from my client that I could pass the windows user/password and the ASP-service would login the user on the server machine.

View 1 Replies

WIF Security Token Service Not Staying Logged In

Aug 27, 2010

I'm using the Windows Identity Foundation (WIF) Security Token Service (STS) to handle authentication for my application which is working all well and good. However I can't seem to get any long running login with the STS. From my understanding I shouldn't care about the client tokens at the application level since they can expire all they want to and it should redirect me to the STS and as long as they're still logged in on the STS it should refresh their application token. Yet it doesn't seem to want to keep them signed in.

Here's what occurs in my login.aspx on the STS
var cookie = FormsAuthentication.GetAuthCookie(userName, persistTicket);
if (persistTicket) cookie.Expires = DateTime.Now.AddDays(14);
Response.Cookies.Add(cookie);
var returnUrl = Request.QueryString["ReturnUrl"];
Response.Redirect(returnUrl ?? "default.aspx");

Which was taken almost directly from existing application using normal Forms Auth.
From my web.config
<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="All" timeout="2880"
name=".STS" path="/" requireSSL="false" slidingExpiration="true"
defaultUrl="default.aspx" cookieless="UseDeviceProfile"
enableCrossAppRedirects="false" />
</authentication>

Looking at the cookie after I sign in I can see the expires time on the cookie is set for 14 days in the future and that the cookie is NOT a session cookie. When I'm required to log back into the STS I can see that my original cookie is still there. Is there some kind of time stamp functionality that the STS embeds into the cookie that is invalidating my cookie even though as far as I know it should still be valid?

View 2 Replies

WCF / ASMX :: Web Service Security Using X509 Certificate

Nov 17, 2010

Am facing problem while consuming a java web service using WCF. below is the web.config and aspx.cs file details

Requirement

Service request and response will be encrypted with certificate. when i run this below code am getting the error "The private key is not present in the X.509 certificate."

<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="TestClientCertificate">
<clientCredentials>
<clientCertificate storeLocation="CurrentUser" storeName="My"
findValue="certificatename" x509FindType="FindByIssuerName"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="TestHttpBinding" maxReceivedMessageSize="1048576" maxBufferSize="1048576" transferMode="Buffered">
<security mode="TransportWithMessageCredential">
<!--<transport clientCredentialType="Certificate"/>-->
<message clientCredentialType="Certificate"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint name="TestHttpPort" address="https://webserviceurl/webservice"
binding="basicHttpBinding" bindingConfiguration="TestHttpBinding"
behaviorConfiguration="TestClientCertificate"
contract="ServiceReference1.webService1">
</endpoint>
</client>
</system.serviceModel>

in page
protected void Page_Load(object sender, EventArgs e)
{
WebServiceClient abc = new WebServiceClient();
BindingElementCollection elements = abc.Endpoint.Binding.CreateBindingElements();
elements.Find<SecurityBindingElement>().IncludeTimestamp = true;
abc.Endpoint.Binding = new CustomBinding(elements);
WebServiceClientResponse xyz = abc.WebMethod("", "");
}
private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
{
return true;
}
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="TestClientCertificate">
<clientCredentials>
<clientCertificate storeLocation="CurrentUser" storeName="My"
findValue="partnerservices" x509FindType="FindByIssuerName"/>
</clientCredentials>
<!--<serviceDebug includeExceptionDetailInFaults="true"/>-->
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="TestHttpBinding" maxReceivedMessageSize="1048576" maxBufferSize="1048576" transferMode="Buffered">
<security mode="TransportWithMessageCredential">
<!--<transport clientCredentialType="Certificate"/>-->
<message clientCredentialType="Certificate"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint name="TestHttpPort" address="https://webservicespprd.biworldwide.com/partnerservices/services/v1/AccountWebService.biws"
binding="basicHttpBinding" bindingConfiguration="TestHttpBinding"
behaviorConfiguration="TestClientCertificate"
contract="ServiceReference1.AccountWebService">
<!--<identity>
<certificate encodedValue="MIIB5zCCAVCgAwIBAgIQlerVslZ+4p1Of3evhNc3TDANBgkqhkiG9w0BAQQFADAP
MQ0wCwYDVQQDEwRTR0JJMB4XDTEwMTExNjA5MjYyOVoXDTM5MTIzMTIzNTk1OVow
DzENMAsGA1UEAxMEU0dCSTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5mYW
n4Qp/8uosJ56fXLqygOkTDuYTTX0KECRce7fkeCFH8SpqQeCltNMjFgNRzr+C4rk
6A7GFe6gMiVyogqYgQn/QyZGT5iTXJ4khkAYui/gLX4Cga3tBCoVckja/93bCUOS
G4rS7W86kgG2hV+BfceqmlRISnlaLWxN/Ys6TAsCAwEAAaNEMEIwQAYDVR0BBDkw
N4AQ7veQWUUKR17/SJxFCEHu56ERMA8xDTALBgNVBAMTBFNHQkmCEJXq1bJWfuKd
Tn93r4TXN0wwDQYJKoZIhvcNAQEEBQADgYEAPsTiaYcghQCtBRH8FupLZIzliSHx
h3rsr6mKQT68rA+I9qjs/lsPaN2ebajDb3xzJRmjlrz2+9Gjc9LUGDaHEgxsPHab
Dh/IOgkqyjVAJHufjroKFfkzTJwwB4/uWU2vOKPpqVXfLqRXJ8du25MI7iWcHVfg
oYS1eESNBuPCErQ="/>
</identity>-->
</endpoint>
</client>
</system.serviceModel>

View 7 Replies

Security :: Authenticate X.509 Client Certificate In Web Service?

Jul 26, 2010

I need to send a X.509 client certificate to a web service in byte array (not attached to request). Besides the certificate, the caller will also send data and signed data. From the web service I can verify if the signature is ok but I don't know what is required to verify that the certificate is ok. I have the client certificate issuer CA trusted in Server (where the web service runs).

More specifically, how can I verify if a X.509 certificate itself is valid? I need to do it in web service not from IIS.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved