WCF / ASMX :: Unable To Get The Credentials Of A Website Calling A WCF Service?

Mar 31, 2011

I have a website(X) hosted on a Windows server .

This Website is running under a AppPool= "CustomAppPool" ( Im using a specific AD Username and Password as the credentials for the apppool)

Website Is running under Credentials "DomainNameUsrName"

This Website should access a WCF service which is running under "MAchineNameASPNET" process

When i try to get the details of the calling method (UsrName) from the client calling the WCF ..... Im unable to to do so

I am always gettting the MachineNameASPNET as the credentials

How can i get the "DomainNameUsrName" from the callign website

View 1 Replies


Similar Messages:

Unable To Pass User Credentials From WCF Web Service To ASMX Web Service

May 25, 2010

My WCF Client calls my WCF Service which then calls ASMX Web Service. The problem is i have configured my wcf client and wcf service to windows credentials type but when wcf service calls asmx service the user credentials (default windowsidentity) is not passed to asmx service.

In WCF Service i am able to get user identity by using : Thread.CurrentPrincipal.Identity.Name;
WCF Service - i have disabled anonymous access and enabled windows authentication. ASMX Web Service - i have disabled anonymous access and enabled windows authentication.
WCF Service Config
[Code]....

View 1 Replies

WCF / ASMX :: Calling A Web Service On A Remote Server From A ASPX Page (website Project VS2005)?

Aug 30, 2010

I am maintaining a web site project in VS2005 and have to call a new web service on a remote server. I've done add web reference, and created the .wsdl and .discomap files in the app_webReference folder. When I try to create a object representing the web service in the code ( wsnamespace.serviceName ws = new wsnamespce.serviceName(); ) the code wouldn't compile.

The web site project is already calling other web services. When I right click on the type representing the web service and "go to definition" it takes me to a proxy class (derived from of course SoapHttpClientProtocol) in the metadata. I think this is what's missing for the new web service i'm trying to call. Have I missed any steps?

View 1 Replies

WCF / ASMX ::access The Client's Credentials Inside A WCF Service?

Jan 26, 2011

I have a silverlight application that uses WCF service and i need to provide windows authentication using wcf.In order to achieve this i am trying to retrieve the client's credentials (windows credentials)inside wcf.

View 1 Replies

WCF / ASMX :: Calling A Web Service?

Dec 19, 2010

there ( my first post in this forum ). i created a web service which searches for user info from a adatabase
based on the user id(input). i want to call this service from the bookstore web site i created for my course project but apparently i'm not doing something right. i get an error : [IndexOutOfRangeException: Index was outside the bounds of the array]. So to give you an idea of exactly what i've done so far, here's the code...

First for the web sevice: using System;

View 4 Replies

WCF / ASMX :: Calling Java Web Service

Jul 8, 2010

how can i call mtom web service without param for the attachment from web service built in java

View 3 Replies

WCF / ASMX :: Calling Wcf Service From Other Domain

Jun 20, 2010

[Code]....

Should I change the configuration so the service could be called from other domain?

View 4 Replies

WCF / ASMX :: Calling Wcf Service From Other Domain?

Jul 20, 2010

[Code].... Should I change the configuration so the service could be called from other domain?

View 5 Replies

WCF / ASMX :: AutoComplete Extender Not Calling Web Service

Mar 24, 2011

I am using AutoComplete ASP.NET AJAX Control toolkit AutoCompleteExtender control When I am using my web service as Service Path, its not working.my web services code below

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data.SqlClient;
using System.Data;
using System.Web.Script.Services;
namespace OnlineSalesGrid
{
/// <summary>
/// Summary description for sample
/// </summary>
[WebService(Namespace = [URL]]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class sample : System.Web.Services.WebService
{
[WebMethod]
public static string[] GetCompletionList(string prefixText, int count)
{
List<string> returnData = new List<string>();
SqlConnection con = new SqlConnection("Data Source=CARPATHIA\SQLEXPRESS;Initial Catalog=OnlinesaleGrid;Persist Security Info=True;User ID=sa;Password=c0rpusdata");
string sql = "select Customer_Name from Customer_Master where Customer_Name like '%" + prefixText + "%'";
SqlCommand cmd = new SqlCommand(sql, con);
con.Open();
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
while (reader.Read()) { returnData.Add(reader["Customer_Name"].ToString()); }
return returnData.ToArray();
}
[WebMethod]
public static string[] GetCompletionList1(string prefixText, int count)
{
List<string> returnData = new List<string>();
SqlConnection con = new SqlConnection("Data Source=CARPATHIA\SQLEXPRESS;Initial Catalog=OnlinesaleGrid;Persist Security Info=True;User ID=sa;Password=c0rpusdata");
string sql = "select Customer_Code,Customer_Name from Customer_Master where Customer_Code like '%" + prefixText + "%'";
SqlCommand cmd = new SqlCommand(sql, con);
con.Open();
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
while (reader.Read())
{
returnData.Add(reader["Customer_Code"].ToString());
}
return returnData.ToArray();
}
}
}

Html Code is

<asp:ScriptManager ID="toolscpt1" runat="server" >
<Services>
<asp:ServiceReference Path="~/sample.asmx" />
</Services>
</asp:ScriptManager>
<asp:TextBox
ID="txtcname" runat="server" CssClass="textbox" onBlur='funblurcolor(this.id)' onFocus='funfocuscolor(this.id)'
ontextchanged="txtcname_TextChanged1" onkeypress="javascript:if(window.event.keyCode == 13) document.getElementById('txtphno').focus" ></asp:TextBox>
<asp:AutoCompleteExtender ID="txtname_AutoCompleteExtender"
runat="server" Enabled="True" ServiceMethod ="GetCompletionList" ServicePath="~/sample.asmx"
MinimumPrefixLength="1" CompletionSetCount ="12" EnableCaching ="true" CompletionInterval ="500"
TargetControlID="txtcname" ></asp:AutoCompleteExtender>

View 14 Replies

WCF / ASMX :: How To Check That Which Endpoint Is Calling WCF Service

Aug 27, 2010

How can i check that which Endpoint is calling WCF Service.

View 1 Replies

AJAX :: Calling Asmx Service From JQuery

Jun 15, 2010

I am trying to call an asmx service using the jQuery ajax call-

[Code]....

I have double checked the url of the service and spelling/case of the name of the method as well as the parameters in the dataStr.

I still get the error-<b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. review the following URL and make sure that it is spelled correctly.

in the responseText of XMLHttpRequest, above.

View 3 Replies

WCF / ASMX :: Error : When Calling WCF (.SVC ) Web Service / System.Security.SecurityException?

Dec 30, 2010

I have wcf web service, I works fine on my local machine,but when I move it to live then it throws following error

System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.

View 2 Replies

WCF / ASMX :: Calling A Web Service Method Asynchronously Does Not Work In Console Application

Sep 15, 2010

I have a web service that has a CreateReport method that generates a report based on the specified criteria.

When I call this method Synchronously using a Windows Application or Console Application, the call works fine and the report is created.

When I call this method ASynchronously (CreateReportASync) using Windows Application the report is created.

When I call this method ASynchronously (CreateReportASync) using Console Application the web service does not even get the call.

I am using VS2005 and .Net Framework 2.0. So the proxy is automatically created with the Async methods. I am not really interested the result of the method call, so I do not add a Callback Delegate.

View 4 Replies

WCF / ASMX :: Calling A Remote Or Local Web Service That Returns A JSON With JQuery?

Mar 16, 2011

how to create a Web service that returns a JSON(or JSONP). That also should be able to work for cross-domain access aswell as for a local call.. help to get this working or for a few links for further reading about this

View 2 Replies

Calling Secure Web Service From Anonymous Website?

Feb 1, 2011

I have a web service that is set as secure via the web config:

<authentication mode="Windows" />
<authorization>
<allow roles="METWeb-Admin"/>
<deny users="*"/>
<allow users="METJoeUser;METJoeSmith"/>
</authorization>

And also in IIS 7 (Windows Server 2008) it has the following set for Authentication:

Anonymous Authentication:Disabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Disabled
Windows Authentication: Enabled

The anonymous site I am calling it from in IIS7 is:

Anonymous Authentication:Enabled
ASP.NET Impersonation: Disabled
Basic Authentication Disabled
Forms Authentication: Enabled
Windows Authentication: Disabled

In the Anonymous web site, I call the secure web service via:

moms.momService myMom = new moms.momService();
NetworkCredential netCred = new NetworkCredential(@"username", "password");
strStatus = myMom.createBackupDirectoryAndPrivs(sData);

Everytime I run this, it returns as Unauthorized. I have made sure this user is in the Web-Admin AD Group. I also tried adding the user as an Allow User but still unauthorized. I am pretty sure the problem lies somewhere in IIS but not sure what else to check.

BTW: For what it's worth, if I run the Anonymous site via VS2010 development on my dev box, and call the secure site using above code, it works fine. This is why I am thinking IIS on the PROD server.

View 1 Replies

WCF / ASMX :: Unable To Access Web Service From Excel VBA

Feb 4, 2011

I have a web service which is accessible from the browser. When I try to access the same web service which is hosted on Windows Server 2008 R2, from an excel Macro, it says

Run-time error '-2147220991' (80040201)':

Server was unable to process request --> The request failed with HTTP status 404: Not Found.

The excel macro works fine when I try to access the same web service on the other server(Windows 2000 Server)

The web service is developed using .Net 2.0.

I'm posting the URL for the web service for your reference.

URLs which are not being accessible from Excel.

[URL]

[URL]

URLs which are being accessible from Excel.

[URL]

[URL]

Both Web services and Excel macros are old applications which have been running fine for years. The only change is that the application is being migrated to a new server(MCDEAGDWEB202) which has Windows Server 2008 R2 and SQL Server 2008.

The Old server(MCDEAGLWEB005B) has Windows Server 2000 and SQL Server 2000.

View 4 Replies

WCF / ASMX :: Unable To Access The Functions From The Web Service

May 28, 2010

I have added a web service as a reference to a windows application using "AddWebRefrence" option. And I am unable to access the funtions in the web service but instead i get the functionnames followed by the completedeventargs and completedeventhandler.

What am I doing wrong and how can i access the funtions in the web service.

View 3 Replies

WCF / ASMX :: Unable To Make Connection Between Client And Service

Apr 30, 2010

I receive the following error, when trying to consume Wcf service:

"An existing connection was forcibly closed by the remote host". Consuming the service works fine when the host and the client are on the same machine. When I move the client to Hyper-V virtual machine (I didn't try it on a real computer) - it throws the error. Both firewalls are turned off Do you know what can cause such behaviour? Here are the details:

Both the client (hyper-v) and the service are on Windows server 2008 R2

Service url - http://wcftest/CalculatorService.svc (wcftest is the website and is mapped in the hosts file to localhost)

Service config:

[Code]....

Client config:

[Code]....

Are there any configuration settings which I'm missing?

View 1 Replies

WCF / ASMX :: Unable To Retrieve The Attachment From Soap Message Returned From SAP XI Service

Oct 28, 2010

I am trying to get attachment from the SAP XI Web Service which is returning the following soap response..

--SAP_db9e7598-e284-11df-9fcf-001125a6de68_END

View 1 Replies

WCF / ASMX :: Calling DotNet Webservice From SQL Server Through CLR - Server Was Unable To Process Request

Nov 30, 2010

I have a .Net Webservice(2.0 framework) and I am trying to call this service from SQL

server 2005 using CLR.

I have created assamblies on server and trying to call the we service through CLR, but I'm getting below error:

"Exception:

Server was unable to process request. ---> Invalid URI: The URI is empty."

View 1 Replies

WCF / ASMX :: "decryption Operation Failed" Exception When Calling Web Service

Dec 20, 2010

These types of exceptions always irritate me because they are almost impossible to reproduce consistently and have almost no documentation other than the cryptic error itself to have any idea on how to fix the problem. So I have a Windows Service that makes a call to a .asmx web service over https on a polled interval every 20 minutes. Once in a great while the following exception message is returned:

Message: The underlying connection was closed: An unexpected error occurred on a receive.

Inner Message: System.IO.IOException: The decryption operation failed, see inner exception. ---> System.ComponentModel.Win32Exception:

The specified data could not be decrypted --- End of inner exception stack trace --- at
System.Net.Security._SslStream.ProcessReadErrorCode(SecurityStatus
errorCode, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer) at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at
System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.TlsStream.Read(Byte[]
buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)

So from reading the above message there was an error on receive and the data could not be decrypted. The does not occur consistently, so I don't have a good way of reproducing it. I also lack at low level messaging knowledge and I feel that this is the answer behind this exception; i.e. dropped packets and an incomplete message not appearing to be the same message as sent from the service or something. Any .asmx gurus out there that can give insight and possibly prevention suggestions for the above issue?

View 2 Replies

WCF / ASMX :: Use MSN And Other Website Web Service Like WEATHER - STOCK - CURRENCY -SMS?

Jan 2, 2011

How to use MSN and other websute webservice? Like weather,curreny,stock,sms etc ? Some thing like the below website exchange rate [URL]

View 9 Replies

Security :: Calling A Java Webservice Using Credentials From Application?

May 19, 2010

I am using Asp.Net application for calling an existing Java webservice. Recently the web service is configured with Security certificates. Now I need to call the webservice using "https:URL .." and by passing the credentials i.e. UserId and Password.

When I call the webservice using [URL] I get the below error. Is the change in my code is causing this error?

Error:Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'. The request failed with the error message: --

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

IBM_HTTP_Server Server at ............ Port 443

View 1 Replies

AJAX :: Unable To Make Wcf JSON Ajax Service Work Through Http Like Asmx?

Jun 22, 2010

I am new to WCF, I was using web service asmx before. I have trouble on making my wcf JSON ajax service work through http like asmx.Could you help me see what wrong in my code?My WCF services are defined in my website application folder. My aim is to call this service in my aspx page java-script code and return complex object back as JSON to my javascript. I have no problem on doing this through classic asmx web service.


When I try to test it through my browser by type this in the URL , URL-http://localhost:3849/WebServices/Account/WCFCompanyService.svc/GetAll. it return "Method not allowed."

But if I type just this URL-http://localhost:3849/WebServices/Account/WCFCompanyService.svc, it return this:

WCFCompanyService Service

You have created a service.To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe URL-http://localhost:3849/WebServices/Account/WCFCompanyService.svc?wsdl

This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:

C#

class Test { static void Main() { HelloClient client = new HelloClient();

[Code]....

This is my Ajax-enabled WCF service code:

[Code]....

This is the web.config service model setting

[Code]....

View 1 Replies

WCF / ASMX :: Pass Credentials In Url Jquery?

Nov 15, 2010

how to pass credentials in url jquery

[Code]....

View 6 Replies







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