Web Forms :: Session In Windows Services?
Feb 28, 2010how to maintain session id in windows services in c#.net ,please help me regarding this issue.
View 2 Replieshow to maintain session id in windows services in c#.net ,please help me regarding this issue.
View 2 RepliesHow 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 RepliesI have an ASP .NET 2.0 (4.0 is an option) page that I've embedded the Windows Media Player to using OBJECT tags.
The player is connecting to a Windows Media Services publishing point on the Web server. This is on a 2008 server.
Everything works great, see it here: [URL]
If I understand correctly, the information the player is showing in its status bar comes from the ID3 tags of the current track. Continuing on this line of thought, the ID3 information must be coming to the player from the media server. Correct?
What I want to do is collect and use the information about the track that's current being played. I'd like to be able to create a custom display for the current track information. I'd also like to put a custom value in the track information to look up additional information about the artist/track from a database.
1)My Windows services application folder is MyWInservice
2)Executable .exe i.e. “myServices .exe“ file located under MyWInservice \myServicesinDebug
3)I have RUN bat file
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe /u "myServices.exe"
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727InstallUtil.exe "myServices.exe"
4)After running InstallUtil, myServices.InstallLog and myServices.InstallStategenerated under .. binDebug folder.
5)Upon pressing F5, I still get the same error.
Error is:
Windows Service Start Failure,Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.
i have an asp.net application in that application i need to restart windows service when i try to do i get Access Denied Error i fixed that by check windows integrated windows authentication check boxbut i want i need to do it without check windows integrated windows authentication anyone know how to??
View 5 RepliesIn our application, we have a need for a user to "impersonate" a different user. Think of it as a hierarchy -- Bob is above Frank in a hierarchy. Bob is logged in, and he needs to do things in the system for a short time as Frank. So, we have given Bob a list of users that report to him, and an impersonate link. He clicks on this link, and, behind the scenes, I log Bob out, and log in as Frank. I also set a session variable that tells me that really Bob is they guy who is the user. Also, Bob (acting as Frank now) has a nice little link at the top of every page that says "Stop Impersonation."
In addition, when Bob is impersonating Frank, Bob is restricted from doing some things, like changing Frank's password.
This was working great, until we encountered a situation where, if the session (I think -- getting confused here) gets destroyed (such as when I copy up new code and dlls to the live site), then when Bob clicks on "Stop Impersonation" he gets redirected to the default page, and is still logged in as Frank, but without the Impersonation session variable. So, now Bob really is logged in as Frank, and can change Frank's password (among other things).
How is it that a session variable (Impersonation) gets destroyed, but I guess the session is still hanging around, because it doesn't make the user log in again?
This is a somewhat serious bug for how our system works (bug in our code, I'm sure, not in .Net). We are using ASP.Net c#, aspnet membership services, .net 3.5, forms auth...not sure what else you need to know.
EDIT: Updated information. Looks like when "something" happens, for instance, when I recompile some dlls and copy them to the webserver, the session gets dumped. Or, rather, the variables in the session get dumped. The session id stays the same. I do get to check for Session.IsNewSession and it returns true, even though the id is the same as it was before.
Just like Utaal mentioned, Membership Services is separate from Session, so it's forms auth token is still hanging around in the browser, but my session variable telling me that that isn't really the user who is controlling the browser isn't there anymore.
EDIT: Sky, here is what I'm doing to authenticate a user. I can't figure out where I would insert a ticket into this flow:
if (Membership.ValidateUser(txtUserName.Text, txtPassword.Text))
FormsAuthentication.SetAuthCookie(txtUserName.Text, false);
I have a fairly complex business application written in ASP.NET that is deployed on a hosted server. The site uses Forms Authentication, and there are about a dozen different roles defined. Employees and customers are both users of the application.
Now I have the requirement to develop a Windows Mobile client for the application that allows a very specialized set of tasks to be performed from a device, as opposed to a browser on a laptop. The client wants to increase productivity with this measure. Only employees will use this application.
I feel that it would make sense to re-use the security infrastructure that is already in place. The client does not need offline capability.
My thought is to deploy a set of web services to a folder of the existing site that only the new role "web service" has access to, and to use Forms Authentication (from a Windows Mobile 5/.Net 3.5 client).
I did see this question and I am aware of the limitations that Forms Authentication poses. Since security is not my primary motivator (I use SSL and can restrict access by IP address), but rather using existing user accounts and roles, my decision tree is somewhat different as well.
how to start or stop windows services present in a remote system using Servicecontroller in c#.net.
View 1 Replieshow to start or stop the windows services of a remote system.
now what i need to know is, is there any possibility such that the windows services can be start or stop by using webservices.
suppose i have created a webservice in remote system which will keep on monitering the status of windows services present in that machine. now i will create a client service which will sends the service(windows service) name and action to be performed(that is starting or stopping the service).so is it possible to do in such a manner.
I created a page for display my own windows services installed in the system. That page displays the service display name and status in the grid view and also showed one button to start ot stop the service according to the statusAll working nicely. But when i click start button i got the error as follows{"Cannot open Service1 service on computer '.'."}and the inner exception is "{"Access is denied"} .
View 1 RepliesActually i dont know whther this is the correct forum or not? but i didnt found any other section to post a question like this.Actually i am in . I need to document the service i developed so when my absence or something the other developer can understand my way and code.The aim is to specify the module descriptions, needs and business logic i used to implement. So the next developer can understandCan anyone tell me the name of this document. Developer Document ? Please tell the correct name of this and any link to download any template to undertand. Please dont take it as simple question
View 2 RepliesI have been spending a better part of a week trying to track down why I am not able to clear all session variables in a web app (vs 2010, vb.net). What I have tracked it down to is that when I remove or abandon sessions that my html pages or codebehind access, it works, but for some reason in any of my class files where I use "Public Shared strConnection as String = HttpContext.Current.Session("strConnection").ToString" to access a session variable, it finds the old one and not the current one. I have to wait for it to time out, go in again, and it will find the new one.
I do not use Linq, and there is only one place in the whole web app that I place the connection string in a variable whcih is when a person logs in. It points them to the correct database. The sqlconnection is set for all of my listviews in Page_Init to make sure that they aren't using any session variable that they create on their own. Interestingly enough that if I use debug to go in each time, exit debug, enter debug again trying to access a different database, it works correct each time. I assume that debug is correctly killing the session variable for the classes for me.
Recently I had a weird problem while trying to install SQL Server Reporting Service in my local PC. I am using Windows Vista Home Premium and I wanted to configure SSRS in my PC. During the installation, the setup wizard listed all the services that we want to install and I found that only Reporting Server checkbox option was disabled and I wondered why??? I thought it may be becuase of some installation problem and tried again and its useless... I googled lot of sites for 3 days and finally found that due to some IIS issues, it is not possible to install Reporting Server in Vista Home Premium version. Reporting Server needs some specific IIS features to be installed in the machine.
But unfortunately those features are not available for Home Premium users which in term restricts users not to install reporting server in our PCs... Also, Microsoft has accepted it as an issue and its not possible to get it install in Home Premium...just wanted to share and might be useful for someone like me.
Reference: http://support.microsoft.com/kb/920201/en-us
I have two WCF services configured with ASP.NET compatible mode to allow them to use ASP.NET session state. The problem is as follows:
1.- A call to the first service stores a value in the ASP.NET session state.
2.- A second call to the first service can read that value.
3.- A call to the second service can't read the ASP.NET session state value.
It seems that the ASP.NET session state is not shared between the two WCF services. Is there a way to share ASP.NET Session state between two WCF Services?
We have created an ASP.NET web app that upload files to WSS Doc Libary. The files get added under 'SYSTEM ACCOUNT' in the library. The FullTextSqlQuery class is used to search the document libary items. But it only searches files that has been uploaded by a windows user account like 'Administrator' and ignores the ones uploaded by 'SYSTEM ACCOUNT'. As a result the search results are empty even though we have the necessary data in the document library. What could be the reason for this?
The code is given below:
public static List GetListItemsFromFTSQuery(string searchText)
{
string docLibUrl = "http://localhost:6666/Articles%20Library/Forms/AllItems.aspx";
List items = new List();
DataTable retResults = new DataTable();
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite site = new SPSite(docLibUrl))
{
SPWeb CRsite = site.OpenWeb();
SPList ContRep = CRsite.GetListFromUrl(docLibUrl);
FullTextSqlQuery fts = new FullTextSqlQuery(site);
fts.QueryText =
"SELECT Title,ContentType,Path FROM portal..scope() WHERE freetext('" +
searchText +
"') AND (CONTAINS(Path,'"" +
ContRep.RootFolder.ServerRelativeUrl + ""'))";
fts.ResultTypes = ResultType.RelevantResults;
fts.RowLimit = 300;
if (SPSecurity.AuthenticationMode != System.Web.Configuration.AuthenticationMode.Windows)
fts.AuthenticationType = QueryAuthenticationType.PluggableAuthenticatedQuery;
else
fts.AuthenticationType = QueryAuthenticationType.NtAuthenticatedQuery;
ResultTableCollection rtc = fts.Execute();
if (rtc.Count > 0)
{
using (
ResultTable relevantResults =
rtc[ResultType.RelevantResults])
retResults.Load(relevantResults, LoadOption.OverwriteChanges);
foreach (DataRow row in retResults.Rows)
{
if (!row["Path"].ToString().EndsWith(".aspx"))
//if (row["ContentType"].ToString() == "Item")
{
using (
SPSite lookupSite =
new SPSite(row["Path"].ToString()))
{
using (SPWeb web = lookupSite.OpenWeb())
{
SPFile file = web.GetFile(row["Path"].ToString());
items.Add(file.Item);
}
}
}
}
}
} //using ends here
});
return items;
}
I am getting "ASP.NET session has expired" error when viewing a (SQL server reporting services) report using report viewer control. sometimes it works fine and sometimes I get this error, it works fine in Dev, but not in test environment. Please let me know if you have any clues.here is the code for the report viewer control.
ReportViewer1.ServerReport.ReportServerUrl =
new Uri(System.Configuration.ConfigurationManager.AppSettings["ReportServerUrl"]);
ReportViewer1.ServerReport.ReportPath = System.Configuration.ConfigurationManager.AppSettings["ReportPath"];
ReportViewer1.ServerReport.SetParameters(new List<ReportParameter> { new ReportParameter("key", "value") });
ReportViewer1.DataBind();
I have an ASP.NET application that is using Signle Sign On using Active Directory Federation Services
When the user first logs into the application, Once they are "authenticated", their credentials remain active while their web browser is open.
Now, I want the "authentication" to "timeout" in 60 minutes. This way if they browse to another page after 60 minutes, they are prompted to "re-enter" their credentials again.
I know that in FormsAuthentication, you can "de-authenticate" someone by calling "FormsAuthentication.SignOut();" in the Session_End Event in Global.asax.
Is there anyting like that for ADFS?
Preventing user to open duplicate web application,while it is running .....
View 1 RepliesWe have a cient we are stting up that has 2 separate physical servers, one that is the web server the other the database server. Using impersonation we have been able to get the website to connect and retrieve data from the sql server so that part is not an issue. The problem is I have a windows service application that must be installed on the web server (as it process files downloaded to an ftp site) and it must be able to connect and write to the sql server as well.We tried adding a system.web block with the impersonation stuff to the app.config file which of course did not work. Can anyone tell me what/how we need to configure this properly?
View 7 RepliesIt seems the Print Icon in Reporting Services is now throwing up a Windows Authentication box. Even when entering my domainusername and password, nothing happens. It just keeps popping up?
Our reporting service URL is a http://IP Address/........
Not sure if that has anything to do with it. We did add the I.P. in the Local Intranet Zones but still nothing works.
I'm storing some value in an asp.net session on the first page. On the next page, this session value is being read. However if multiple tabs are opened and there are multiple page 1->page 2 navigation going on, the value stored in session gets mixed up since the session is shared between the browser tabs.I'm wondering what are the options around this :Query String: Passing value between the pages using query string, I don't want to take this approach since there can be multiple anchor tags on page 1 linking to page 2 and I can not rewrite the URLs of each tag since they are dynamic.Cookies??? In-memory cookies are shared across browser tabs too, same as the session cookie, rite ?
View 5 Repliesim new to asp.net. . . im doing my final year project.How to use session variables in application using VC# and I also need to check with data base?
View 2 RepliesDoes Session Time - out is applicable ing Windows authentication?If so, in what event can i capture this?
View 6 RepliesI'm working on an ASP.NET MVC web application that will be deployed across multiple load-balanced servers. With this setup, a user might have one request served by server A and the next request will be served by ServerB or ServerC. We don't want to store Session Data in the database, as we're trying to minimise database hits where ever possible. As such, we need to have the HttpSession managed and stored on another server. My understanding is that this is possible by using a Windows Service that will manage this for me, but I'm unfamiliar with how to implement this. Can somebody point me at some good documentation on how to do this? Or any pitfalls or other points to take into consideration?
View 3 RepliesI have ASP.net application that is basically a data entry screen for a physical inspection process. The users want to be able to have multiple browser windows open and enter data from multiple inspections concurrently. At first I was using cookie based sessions, and obviously this blew up.I switched to using cookie-less sessions, which stores the session in the URL and in testing this seemed to resolve the problem. Each browser window/tab had a different session ID, and data entered in one did not clobber data entered in the other.
However my users are more efficient at breaking things than I expected and it seems that they're still managing to get the same session between browsers sometimes. I think that they're copying/pasting the address from one tab to the other in order to open the application, but I haven't been able to verify this yet (they're at another location so I can't easily ask them).Other than telling them don't copy and paste, or convince them to only enter one at a time, how can I prevent this situation from occurring?