I am going through how ASP.NET page is processed when the request is send from browser to Server. From many sources i came to know that during asp.net request processing Application Manager instance is created and the Application manager creates the application domain . The Application domain provides isolation layer with in the process. My Question here is for the same application if there are many requests coming up , will all the requests will be processed by same App Domain or it will create many App Domains for each request. How to calculate how much memory the Application Domain is using. Will the App Domains share the dlls if many App Domains are using the same references like (system.web, system)
Related
I'm trying to share authentication cookies across a .NET Core app and an MVC 5 application. This is possible according to: https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/compatibility/cookie-sharing but requires the servers to have physical access to a shared directory that holds the Data Protection keys.
How does one go about sharing these keys if the servers are not physically located together? In my case they're different Azure Web Sites.
Using SignalR, is it possible to update website clients from my WCF service if the service is not used by these clients directly?
I have a desktop application in .NET which has WCF service used internally using net.TCP protocol. This application changes one of the status fields in database table depending on certain user actions. I want to notify this change to end users who are accessing a different website hosted on the same web server.
I have tried one SignalR sample where notification works fine if it is sent from same website's host to its own client (stock ticker sample). But in my case, the message should go from WCF service to a website client.
IMO you should do an intermediate hop, for example having your website exposing an endpoint (you pick the technology) where you can post whenever you have a change to notify. Your WCF service would post there whenever there's a change, and the web app would process the post by broadcasting info to the target clients (can be all, or can be just some you filter with some logic behind the post). I use this pattern quite frequently, implementing it with HTTP POST. You would have no issues to implement the SignalR infrastructure in the web app, which is where your clients already connect to.
Given that HTTP is a stateless protocol, does IIS keep 'rebuilding' a requested web application for every user and every request?
Suppose a user arrives to a login page. IIS builds the web application and returns the login page to the client. The client enters his credentials and is then taken to the landing page of his account. Was the entire web application rebuilt just to get him from the login screen to the landing page?
I have been reviewing the literature on the asp.net web app life cycle but can't seem to find a clear answer on this.
ASP.Net applications are usually already compiled before they are deployed to your IIS server.
What happens is that IIS will load your application when the first http request is received. For other requests, they will only be served by IIS as the app is already loaded.
The fact that http is stateless does not have any correlation with how the app is manager by IIS. It only means that no state is maintained at the protocol level between 2 requests.
I have an application which is structured as:
Web Application - WCF Service - Database
All communicate to and from the database goes through the WCF Service, the Web Application is not able to directly talk to the database. I needed to protect the data as it travels across, so i setup SSL on my local machine to test and configured it in IIS, so now the WCF Service has to be hit using HTTPS. However, I did not setup my Web Application to use HTTPS, is that ok? I thought since the WCF Service is doing all the transferring of data, it's the only one that needs HTTPS.
Thanks.
If you're interested in encrypting your data, you need to make sure it's passed encrypted on all tiers of your application. From your description it seems that the data passed from the user to the WebApplication itself is unencrypted and therefor passed in clear text. This means that anyone that "listens" to the traffic between your users and the Web Application can intercept the data.
I recommend adding SSL on the Web Application too, to make sure that your data passes encrypted through all 3 tiers of your application.
The question,
I have a web application - .net 4.
The client is having a requirement that he want to send email to his users on a regular basis about his new courses etc.
The webapplication created will hosted on a "Shared hosting environment" with no excess to windows services - file system other than the web root folder through FTP.
The PROBLEM is that ...
Due to shared hosting i cannot create a windows service for him which will check the database - if there are any scheduled mail to send every 5 min.
So my question is - Is there anyway i can run a wcf web service or any other web based service or page or handler which can keep running and automatically checks the database for any new scheduled mails - if yes start sending it automatically in an different thread.
Any different suggestion or answers are also very much welcomed. Thanks SO Experts.
Create a webmethod in WCF that needs to be called, and that can be reached through a url, for example:
http://www.example.org/checkandsend/email/
Add a new scheduled task on your own PC, that calls that URL every five minutes. Voila.
Rick Strahl: Forcing an ASP.NET Application to 'stay alive'