Save User Credentials On Server For Running Queries In Background?
Apr 1, 2011
We have an ASP.NET / Silveright web application. The silverlight client displays user specific data in a graphical form - it requests the data from the server: Problem: Getting this data is expensive, due to the underlying database queries that the server has to perform - so the client has to wait... Optimisation Idea: We run the database queries at regular intervals on the server, writing the results to a 'userdata' table in a database 'close' to where the ASP.NET server runs. The process of running the queries and writing the data to the tables is performed by a 'data collection' service, which is separated from the ASP.NET server.
When the client requests data the server retrieves it from a 'userdata' table. This should be nice and quick - we probably have the 'userdata' tables on the same machine as the ASP.NET server. We also have the added benefit that the client sees data even if the underlying database is offline. Of course the data is not live - but all data is potentially old as soon as it reaches the client. So now my Problem: The 'data collection' service needs the user credentials in order to perform these database queries (because each user gets different results for the same query).
How can I store user credentials in a database, in an acceptable 'secure' way? Such that the 'data collection' can impersonate a user to perform the database queries. Our initial scenario is based upon using windows integrated login to the database.
View 1 Replies
Similar Messages:
Aug 3, 2010
I have a web application that initializes a third-party com application to perform few calculations. The website is deployed on a windows 2008 server (standard edition).
The problem I have been facing is that when I am logged in to the server (Remote Desktop Connection only as the server is not local), the com application initializes fine. But when I log-off or just close the remote desktop connection, the application doesn't get initialized. I have searched for a solution and found this:
[URL]
I created the scheduled task as I didn't know how to create the windows service (the description at
http://support.microsoft.com/kb/251192 is too confusing), and got the application to run when windows starts before even the user logs-in. But in even in this case, the application doesn't work unless the user is logged in and when I log-in, a second instance is created (with exactly the same user (admin)) and the original instance is never used.
I cannot get the application to run without logging off or atleast having to close the remote desktop connection.Is there anything I am doing wrong?
View 1 Replies
Mar 15, 2010
I need to pass specific user credentials to a .svc so it can be used to open a server. The code in my .svc is as follows
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
public string OpenServer()
{
RFCOMAPILib.FaxServer objFaxServer;
NameValueCollection appSettings = ConfigurationManager.AppSettings;
sFAXServerName = appSettings["FAXServer"];
objFaxServer.OpenServer();
}
View 1 Replies
Jan 20, 2010
I have an ASP.net 2.0 application on an IIS6 server with a second server running SQL.
The problem I have is that I can't use Integrated Windows Authentication to authenticate against the SQL server, instead the IIS passes its machine name (DOMAINMachineName$) to the SQL server. Of course I can add the necessary permissions to the machine name account on SQL, but I want to use the local user credentials in Integrated Windows Authentication to authenticate against SQL.
I have tried to find some reading/articles online but apart from a basic understanding I can't find the details I need to implement into my application. All I have found is that IIS doesn't pass the credentials onto a remote machine when using Integrated Windows Authentication, and Kerberos should be used instead. I have no experience of Kerberos or how to use it in ASP.net so I am hoping it can be done using Integrated Windows Authentication or be pointed to some good easy to understand articles on using/implementing Kerberos.
View 6 Replies
Aug 24, 2010
We are building a front page/dashboard that queries our database for live statistics. The page has 3 update panels, each update panel has a user control that pulls data for it's box. Lets call the user controls UC_NotStarted, UC_Active and UC_Finished.
We have built the queries that return the data and all of them take a while to run (~7 seconds each). So if we let the first page run with one update panel the image spins for ~21 seconds and display everything. We have broken that code into 3 update panels and set the loading to conditional. When we do this we get one box to load every 7 seconds. That's a step in the right direction but they load sequentially (UC_NotStarted is queried waits 7 seconds and displays, then UC_Active goes for 7 seconds, and finally UC_Finished runs for 7 seconds). We are still at 21 seconds but data is being shown every 7 seconds.
We would like all of the data to be shown in 7 seconds since all of the update panels should be fetching the data at the same time. Instead of using LinqToSQL to pull the data I am now leaning towards web services to get it but not sure if that will work.
View 1 Replies
Jun 16, 2010
I have a drop down with several option. I would like that if a certain item is select then a certain query will run. I read a post that
azamsharp on 12/23/03 .In that post he suggested to do:
string myProcedure = DropDownList.SelectedItem.value.ToString();
SqlCommand myCommand = new SqlCommand("myProcedure",myConnection);
while reading through the post it seems that this wasn't a great idea.
View 15 Replies
Feb 16, 2010
I have a web form and code snippet for it is below:
<body>
<form
id="form1" runat="server">
<div>
<h5>Welcome
<%= System.Security.Principal.WindowsIdentity.GetCurrent().Name
%>.........
But when run my web application, i m getting message "Welcome NT AUTHORITYNETWORK SERVICE " and not the current windows user name.
View 1 Replies
Jan 21, 2010
I was thinking to create a timer to display the elapsed time for a long running task in my asp.net application. I was able to create the timer to run using javascript but i have a problem with it, that is, how can i maintain the elapsed time so that even the user navigate away from the page, the timer will still running and when user return to that page again, he/she still can see the timer running. Beside that, another user that access that page from another computer will also see the timer running. How i can achieve this??
View 1 Replies
Mar 28, 2011
I have a user control (ascx file) that contains an interface for users to change the data retrieved from the db. So, I am displaying data and most of this data can be edited by the user. When the user enters text into a textbox, and clicks "Save Changes", the value they typed in is lost and not persisted to the database. I realize now this is because the SaveChanges button does a postback, and the user control gets reloaded with its original valuesbefore the code within my SaveChanges button gets executed. I'm not sure if there are properties I need to set to save the input data, or if I need to write my own code to do it. What is the generally accepted method to do this? (Also, all of the controls in the ascx file are wrapped in an Update Panel.)
View 8 Replies
Nov 23, 2010
Here is the simple scenario that I want to apply; There is a .NET application(console or windows) appA and this code updates a large global variable(+50MB) in the project every 30sec. I have another application appB which is a .NET web application and I want to be able to access the updated value of global variable in appA from appB whenever I want.
View 3 Replies
Feb 4, 2011
In my website, I am using thread to perform a repetitive process in background. Now the process takes around 30 to 45 seconds to update the database.
Basically the function performs the following:
1) Download the CSV from a website.
2) Parse the CSV and update the database tables.
I want to optimize the performance and decrease the time it takes to 15 seconds.
How can I do this?
EDIT:
Here is the Code:
[code]....
View 1 Replies
Oct 18, 2010
I want to be able to run an ASP.NET application when a file is upload via FTP. I understand how to use the filewatcher class to monitor the directory but I don't know where to put the code so it is always running.
Files will be uploaded once per month for each group of users of the system and the next time the user logs on after the upload I would like the application to reflect the new data. I don't want to check for a new upload when each user logs on because the processing could take a log time.
The uploads are automatic from multiple other computer systems and not done by any user.
The Application is hosted (by GoDaddy) so I don't have full control of the server.
Is there any way to have a process running all the time in the background and if so how? The application is written in VB.net.
View 1 Replies
Aug 3, 2010
Bit of a long shot, but is there a way in ASP.NET to dynamically get the website's URL [URL] when there is no HttpContext.Current available.
There is no HttpContext because the code is running in a background thread* (but under the ASP.NET AppDomain). I have a background process that sends emails out every evening, and needs to include the Web address, but I don't want to hard code it because of deployments and testing (it changes from [URL] to[URL] and then to [URL] for the live site).
View 2 Replies
Feb 3, 2011
In my website I am using thread to perform the function which downloads the CSV from a website and parses the data into the database.
Now if I am not able to stop the thread then what could be the impact on the performance?
Also If I unknowingly start another thread then would it impact my website's performance?
View 3 Replies
Aug 25, 2010
I have Requirement to update the label text as we are processing the code (Long running).
Example:
I have Label and button on aspx page.
On button Click Iam calling the AppCode which is going to do long work for me.
I want to update the label text from the appcode (which should reflect in the page then and there.)
I have tryed to pass the text value to the label but it shows the changed text only after the event for the button click is finished.
I tryed using timer but as soon as i click the button the refreshing stops.
I tryed progress template and UpdateProgress without success. (I know we can update at the start and end of proccess using this)
I dont want to use iframe (I know we can do using iframe)
View 3 Replies
Jan 27, 2010
I want to save the *.docx and *.* type in client side, how to save the files from server to client without any promt to users.
View 1 Replies
Jan 13, 2011
I am making a SignUp Page in ASP.Net 4.0 and i am facing a problem that How to store Signup Data in SQL Server 2008-R2 like User Name,User Id or Password.
View 9 Replies
Jan 17, 2011
I have success to store the login tim for the user but i am unable to save the logout time for logged in user
When saving logged in time, logout time is saved as null(thats ok for me)
but when user log outs it is saving the logout time on the next row instead of saving in last updated row for that user
I need to calculate the time diffrence in hours for particular date for the users
View 6 Replies
Feb 1, 2011
I'm working on an ASP.NET project for the first time in about three years; in the meantime I've been working with Python/Django, PHP and Obj-C. Anyways, picked it right back up... except something that is totally killing me right now, and I have a feeling it must be staring me in the face:
I'm trying to bind to an LDAP server, for the purpose of authenticating users. The way it works here is, you bind on your own credentials, use that to find the Distinguished Name of the user you're authenticating, then you bind again on their DN and their password. If the bind is successful, the password was correct and the user can be authenticated.
Here's the problem - the first bind (on the fixed credentials, the ones with the ability to search for users and their subtrees) works fine. The search works fine. The second bind fails, no matter what, with the LDAP error INVALID_CREDENTIALS. This happens even when completely valid credentials are supplied.
Here's the code, with the usernames and passwords redacted, of course...
[Code]....
View 1 Replies
Jan 19, 2011
I'm trying to write code that will allow a user to click a button and be prompted to save an image file that resides on the web server. I'm using the following code, but I get an error that says "Error: Could not complete the operation due to error c00ce514.".
[Code]....
I have verified that the file exists. Is there another method for prompting users to save a file to their local machine?
View 3 Replies
Mar 22, 2010
If a user has signed into their computer and are connected to an intranet, is there a way to grab the users crendtials and authentication them in asp.net? What specific code would do this?
View 2 Replies
Nov 23, 2010
A friend of mine gave me this task so I can learn advance programming a little bit easier. I am currently doing convertion of an html page to pdf using itext sharp and email the pdf as an attachement. My idea is to save the pdf first to the server machine in the folder name ToBeEmailedPDF folder before using it as an email attachment. The thing that bothers me is that this dialog as what you can see in the picture shows up using the code that I have below.
[code]....
View 2 Replies
Jan 30, 2011
I'm building a web application: some pages will be accessible by non logged-in users (demo and sign-up pages) and others will only be accessible by logged-in users (actual application). In the global.asax file, I'm currently handling the session start event by loading some variable from a query that's based on the UserID. What will happen when a non-logged in user looks at a page? I guess my question is really about how to handle the session start event when it's a logged-in user, when it's not and when a user logs in. I want a certain number of queries to run only once per session, after the user logged in.
View 2 Replies
Sep 22, 2010
I have developed a web service and installed in a server suucess fully, its working fine there.
I tried to work in another server, But I had some error there in the new server.
I trying to access a network folder, Its accessible for the user which I have mentioned in the web config, But I'm having error.
in the web config
<identity impersonate="true" userName="UserName" password="password"/>
View 21 Replies
Mar 1, 2010
In my environment, we use Active Directory as our password repository. I'm writing an app that uses the users windows session (windows auth) to authenticate the user. This is working well, but I need to provide a way for users to log in as a different user. I setup a web form to accept a username and password. My question is this, I need a secure way to validate the user's credentials against AD. I cant have the credentials passed as clear text. Ive come across the impersonate user functions, but i'm leary because you have to pass a clear text password into the password field. I know I could also use LDAP, but without a certificate, I know plain LDAP is relatively insecure. Can someone point me in the right direction of a more secure solution to query AD with the credentials?
View 3 Replies