C# - Multiple Hops Impersonation In .NET And Web Services?
Sep 28, 2010
I have old school web service and it is configured to impersonate the caller. Works with no problem. Now I am thinking about adding another more higher level ASP.NET (non-wcf) web service which would be calling the original web service.The question is - will the client identity flow across two hops as in client (1)-> new web service (2)-> old web service) or there will be issues?
View 2 Replies
Similar Messages:
Mar 18, 2011
From my following code snippet:
ExchangeServiceBinding binding = new ExchangeServiceBinding();
binding.Credentials = new NetworkCredential(username, password);
binding.Url = "http://servername/ews/exchange.asmx";
The above web services throws Unauthorized Access Error (Error : 401) for newly created users.I would like to know how to impersonate this user for accessing this exchange web services.
View 1 Replies
Jul 13, 2010
I make an asynchronous call from one web service to another web service deployed on different server? The scenario is that an ASP.NET webforms page will call a web service in an async manner. This particular web service will then make another async call to a second web service deployed on different web server. This this possible to achieve, and what additional steps or code would be necessary to make this happen?
View 1 Replies
Jun 18, 2010
I'm writing some merge functionality in C# asp.NET MVC2. I am also using using Linq2SQL.
I have a block of code which calls two services, MessageService and UserService. These both in term call their appropriate repositories and make the amendments to the db. Each repository declares it's own instance of the repository so I'm thinking this will escalate the following code to DTC . The code is called from the AccountService, is this going to work at this level? And also is it bad practise to declare the DataContext at the top of every repository or should I pass the object around somehow?
//Run the merge
try
{
using (TransactionScope scope = new TransactionScope()) [code]....
View 2 Replies
Feb 5, 2011
I have a quick question about best practices and especially expected performance for the following scenario:
If I want to query data from multiple servers that contain schematically identital sql databases, would having each server provide a web method that a single client application can consume be an appropriate (and relatively fast) solution?
The data just needs to be consolidated on the client end, where several web methods would have to be consumed serially (or in parallel?) to provide the data to the client. Each server would also be implementing Entity Framework as an ORM.
Performance is my main concern here, would it turn out excessively slow as we start to scale up to more and more servers?
View 2 Replies
Feb 23, 2011
My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.
View 1 Replies
Aug 31, 2010
I'm currently developing a program using ASP.NET 2.0 (C#) and i am using Reporting Services 2005. One of the report requirements is to export a data to an excel with multiple excel sheet.
Is there other way to generate multiple excel sheet using the reporting services? if yes, i would like to ask a sample code..
View 6 Replies
Feb 8, 2011
I've a solution which consists of a web project and a class library project. The web project solution directly references a wcf service. There is a 2nd wcf service, but it is the class library project which directly references it. I'm adding the class library (output) as reference to my web project.
Hence in my web project's web.config I now have two scf services configured. This process was easy since I had manually copied the app.config (system.serviceModel part) directly to the web.config, and then configured the web project to talk directly with another wcf service (directly, not through any dlls).
My web project needs to talk to a 3rd web service (asmx). Again I plan to bring this as a class library and include the dll into my web project. (This is a separate solution). When I took a look at this particular class lib project's app.config, I thought i just copy those necessary sections and merge it correspondingly with my current web.config.
So for the 3rd class lib project (which references the asmx service) I happened to notice that it had, under the bindings node, a node called basicHttpBinding, and next, a customBinding. Then further under the client node, there were two endpoint nodes which had the service attributes. (I don't understand why there should be two end points here first of all).
So I copied what came under the bindings node (from the 3rd class lib prj app.config) and appended it to the bindings node (in the web.config). I did a similar process for copying the end points too. But now when I try run the web site I get an exception which halts at the time of initializing the soap client (asmx service): it says something like its not able to determine the endpoint for this contract.
The web.config before I add the asmx web service looks like this:
[code]....
View 1 Replies
Feb 4, 2011
How to Find All the Web Services and Windows Services Running on a Server in ASP.Net. I have the server details with me and want to find all the Web services running on it.
View 1 Replies
Apr 3, 2010
I am using Visual Studio 2010 Release candidate1. I have to deploy my web application which consists of a website, certain window services, certain WCF services and Sql Server 2005 database.I read Vishal Joshi's blog(http://vishaljoshi.blogspot.com/2009/09/overview-post-for-web-deployment-in-vs.html) detaing Web Package in VS2010. I want to know how to deploy window services and WCF services using Web Package. Also, I want to create a web setup (.msi) for deployment instead of Web Package so that the .msi takes care of all the application and database deployment like the web package does.
View 1 Replies
Jul 20, 2010
I installed vs2010 in my machine and opened solution (of same version copied from other machine).
But getting stateservices error message..Moreover i am unable to find asp.net services in the list of services under serives.msc.
View 2 Replies
Mar 4, 2010
I am using HTML controls while using Ajax in my .net project. Now I want to make my text box to be autocomplete. I am fetching a data using a query for the respective typed text but i am not sure how to bind that data to text box and show it the way it is being displayed in google and other famous sites. I would also love to know the way using web services. Which way is more efficient?
View 1 Replies
Aug 10, 2010
what is impersonation and when, why to use it?I am not getting it.
View 1 Replies
Sep 7, 2010
I modified the ASP.NET login control to also allow specifying UserRole ('Employee' or 'Volunteer'). Users are authenticated via a call to a webservice written by our client, which accepts username/password/role and returns true or false.If role is 'Employee' it represents an active directory user. The application should impersonate the user with the given username/password.If role is 'Volunteer' the application should run under a set Windows account whose username/password are known in advance (i.e. hard-coded in web.config file).
View 1 Replies
Mar 4, 2010
what is impersonation in asp.net? Is authentication and impersonation both are same ?I googled and found both are one type of security.
View 3 Replies
Jan 14, 2010
I need to pass a NetworkCredential object with the credentials of the currently impersonated user to a web service from an asp.net application.My code looks like this:
WindowsIdentity windowsIdentity = HttpContext.Current.User.Identity as WindowsIdentity;
WindowsImpersonationContext context = windowsIdentity.Impersonate();
try {
[code]...
View 2 Replies
Feb 25, 2010
The masterpage of my site is using a control that reads data from a network share. To make this work on all pages I'm having to enable impersonation for the whole site. But what I want to do is only enable it for the pages that actually read/write to the share. Eg:
<location path="SystemAdmin">
<system.web>
<identity impersonate="true" password="abcdefgh" userName="MYDOMAINAdministrator" />
<authorization>
<allow roles="Admin" />
<deny users="*" />
</authorization>
</system.web></location>
View 4 Replies
Mar 13, 2011
We are in the process of building ASP.NET windows auth application. Where user need to interact with other internal system using the same single sign on. To interact application DB the system relies on App Pool account, for this we are every time doing the imporsanation to before every DB call. We can not have all useres added to DB, or create an SQL account. Which requires password and user to store in Web Config. We can encrypt it again you encrypt with what and etc ..So we have one windows account wihich same windows account used for our app pool as well.
I would like to know from the team is what is the best way to do the DB connection in this case?What is the implcations if we imporsanate the DB calls based on the app pool account ? Is it a best practice? I have read it creates its own thred and stuff, Do we need to worry ?
View 1 Replies
Feb 9, 2011
On http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.100).aspx there is an example on how to do impersonation with .net 4.0. We have used this example in a class that inherits IDisposable for ease of use. However, when we use this class in a asp.net web application, we notice a slight but steady increase of Pool Paged Bytes in performance monitor. After a week, the application crashes.
I've tried different implementations of the impersonation-class, using http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.90).aspx and http://support.microsoft.com/kb/306158 as reference, but they all show the same leak.
Where does this leak come from? Is there a problem with the windows api? We are running Windows 2008 R2.
This is our current version of the impersonation class:
public class Impersonator : IDisposable
{
public Impersonator(string username, string domain, string password)
{
if (!ImpersonateValidUser(username, domain, password))[code]....
And this is the performance monitor graph of two webservers using different versions of the class:
When we disable the class, and use global impersonation via web.config, those lines are completely flat.
Update,I have made a test-application that successfully reproduce the problem. It can be downloaded here:
http://rapidshare.com/files/447325211/ImpersonationTest.zip
The result over 18 hours looks like this:
View 1 Replies
Apr 13, 2010
I noticed impersonation is turned on by default in MOSS web configs. I tried disabling it but the web app returns an error. So my question, is it possible to disable impersonation in MOSS? If it is possible are there any special considerations I should be aware of?
If you're interested in why I need to do this...I need to have a custom web part (developed with SmartPart) talk to a separate SQL server using the application pool rather than the current user (Kerberos is enabled). If I set the authentication mode to NTLM I get NTAuthority/ANonymous login errors from my SQL connection. If I turn Kerberos on, the currently logged in user's credentials are passed. If I hard code the user id and password in the connection string it seems to ignore it and default to whichever security model is in place (NTLM or Kerberos).
View 6 Replies
Jun 30, 2010
I've added the identity tag for impersonation. I've configured my site under IIS 5.1. The identity i've added is my domain username/password. But when I run any exe file from my asp.net file, it still runs under "aspnet" user name.
View 1 Replies
Aug 6, 2010
suggest me a good Video to look at that can give me a start on how to use Impersonation?
View 1 Replies
Dec 27, 2010
I am trying to use impersonation on an IIS server while I access Active Directory data. The following code works fine on the localmachine but when I put this same code on an IIS server I get an error: System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.
If I remove the top 4 lines and add my ID and passcode to the DirectoryEntry, everything works fine. I would prefer to not have my id and passcode anywhere on the web. Any ideas on how to fix this? Dim impersonationContext As System.Security.Principal.WindowsImpersonationContext
View 2 Replies
Sep 2, 2010
I am using impersonation in my ASP.NET application to access network resources. It works fine when I run on my computer, however when I setup the site on IIS6, it does not work. Is there some extra configuration, I need make in IIS for it?1. I created an account "TestUser" with the privilege as "act as operating system" on a server that has the resources which I want to access.2. The impersonation works fine on my computer, when I run from visual studio. My computer is on the network under same domain where the "TestUser" is created.
View 5 Replies
Jun 7, 2010
Summary: One of our web applications requires write access to C:WindowsTemp. However, no matter how much I weaken the NTFS permission, procmon shows ACCESS DENIED.Background (which might or might not be relevant for the problem): We are using OLEDB to access an MS Access database (which is located outside of C:WindowsTemp). Unfortunately, this OLEDB driver requires write access to the user profile's TEMP directory (which happens to be C:WindowsTemp when running under IIS 7.5), otherwise the dreaded "Unspecified Error" OleDbException is thrown.
View 1 Replies