I have about 50 web-sites, load-balanced across 5 web-servers. They all use Enterprise Library Caching, and access the same Caching database. The items in the Caching database are refreshed every few hours, using an ICacheItemRefreshAction implementation.I want to guarantee that only one web-site ever refreshes the cache, by putting the refresh code in a critical section. If the web-sites were running in a single app-pool on a single server, I could use a lock()If the web-sites were running in separate app-pools on a single server, I could use a Mutex.However, these will not ensure the critical section across multiple web-servers.Currently, I am creating a new key in the caching database to act as a mutex. This will generally work, but I can see a slim chance that 2 processes could enter the critical section.
public class TakeLongTimeToRefresh : ICacheItemRefreshAction
{
#region ICacheItemRefreshAction Members
I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.
This works great for session state but my next challenge is Cache
My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.
There are two challenges that I face
1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.
2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.
For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.
My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.
Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?
I have data that is stored on a local machine and periodically replicated using webservices. This data is critical to the application of this program and is along the lines of business transactions.
TransactionHeader JOIN TransactionDetail
So forth.
Should I be using some type of CRC checking when sending the data to the webservice or is this handled by the TCP protocol itself sufficiently?
EDIT: Just to be clear the data isnt deleted from the client until the server acknowledges receipt and I use strongly typed parameters in my webservice but I am more thinking about "mangled" data (although in all cases but string it should theoretically fail datatype casting).
I am trying to create a forgot password section within my login section and it doesnt seem to work.
In my forgotpassword.aspx page my code looks like this:
[code]....
According to our records, you have requested that your password be reset. Your new password is: <%Password%>
If you have any questions or trouble logging on contact a site administrator.
No connection could be made because the target machine actively refused it ::1:25
Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it ::1:25
I have a web application that will be distributed over 2 servers and the Database will be on a server other than the 2 servers. so application on each server will access database exists in another server.I am using caching in the application and when data changed the cache is cleared and the problem now how each server will feel with cache changes on the other server?
I have tried SQLCache dependency before and i have heard about Memcached, Velocity and Enterprise cache so which one will be more efficient and optimal for this case? and i have another solution to create webservice method on each application and when the cache is cleared in one application it will request the webservice method on the other application to clear cache there.
Which technique is more efficient and optimal in performance and security? and is SQLCache dependency related to SQL database only or can be applicable to other databases like Oracle?
Note: I am using load balancer to distribute requests coming for the application among the 2 server
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?
I've a web server and a separate SQL server. I'm trying to use transaction scope to ensure that SQL queries are completed with my linq queries.
I wrap everything with this
using (TransactionScope scope = new TransactionScope())
I want to know where I need to install DTC. Do I need to install it on the IIS 7.5 box AND the SQL server? Do I need to unblock some ports? Are there any security risk in doing so?
I've setup this up once before but don't remember how. If I can't get access to DTC then is there any other way to ensure a lINQ and sql query is atomic?
I have a problem that i'm sure will not be hard to fix for anyone who has been using CR for some time.
To start I have created a program in VB2008, that uses a MS Access data file, I can connect to it with no problem and can also add data and amend data, so all seems to work perfectly. I have published it and it once again runs perfectly on another/s machines.
I have now a requirement for a number of reports so have choosen CR for this purpose. I have connected the report to the database and that runs with no problems at all, that is untill I try to run it on another machine, it seems not to be able to find the database and comes up with a panel wanting me to log in with a password and Admin name.
I feel it's proberly a problem with the path of the database, I have tried so many time with diferent data files but with no success.
i have problem about when i try to login it cannot be perform, instead of it gives "A critical error has occurred. Object reference not set to an instance of an object." but user name can accepted but the password cannot be accepted.
My system: I have installed Windows 7, VS2010 and .NET40 and ASPAJAXExtSetup.msi I'm getting the error below.
Error Summary. HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032
Config Error The configuration section 'connectionStrings' cannot be read because it is missing a section declaration Config File \?C:inetpubvhostscno-o.comhttpdocsweb.config
I'm trying to create a member section for my website and a non member section. I want the nonmember pages to have access to all the member pages but just not certain features like saving to the database. Is there a way to have the same page for both members and non members but have certain controls like buttons and other things that are only usable to the member that is logged in?
Currently have an asp.net web site which is contained on 2 web servers which are load balanced i.e. web farm.
I would like to have some code which would allow me to call a particular server and execute a method on it. I WANT TO do this so that i can force all web servers to refresh their cache via a web page on the site.
Use Case is: Admin user logs into site and makes a change to a setting which is cached and then clicks "Refresh web server cache" button which then calls the update cache method on each of the servers. this is to prevent me from having to restart the app pool every time a cached setting is changed.
the authentication using forms will result in a similar line of code
FormsAuthentication.SetAuthCookie(strUsrNm, True)
this is fine in a non load balanced server instance. how does authentication work in a load balanced stuation (no sticky session/infinity), and you cannot store the client IP, users password or login in the browser.
Browser Load balancer Web app (on server 1) || Web app (on server 2)
limitations: no database sessions, no AD server (for example: cater for external users)in short - in a load balanced situation how does the appliation know who the user is if they authenticated against the other server without re-authenticating.
I would like to make a "select" from an Access (mdb) file in SQL Server 2008 R2. I was using:
SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','C:..FILE.mdb', 'SELECT * FROM Users')
But I´m getting the error: Msg 7308, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.
We have a small web farm(2 servers) balanced by the built in network load balancer in Windows 2003. We have a few pages that use page caching. My question is: Is it possible that that a given user could cause a page to be cached and another user see that content? Here is the page directive for the page in question:
The reason the duration is set to "1" is to ensure that the page isn't cached any longer than 1 second because of transactions that actions on the page can trigger.
So I have an ASP.Net web forms application that is using URL Routing. It works great on the old single server shared web hosting account. It has been moved over to a new platform that appears to be a web farm. When a postback happens it now just refreshes the page and the event handler is not envoked. Another thing I've noticed is they put the application into a sub-folder on the account and are using ISAPI Rewrite to point the domain to the sub folder.how to get the postback to execute on this web farm?
I am working on a project where we want to provide link to download excel file.We are using NLB for load balancing,NLB cluster contains 3 machines.constraint is that excel file to be downloaded is available on a single machine.How to ensure that HTTP request underneath will served from the same mahine?
I have this error: The configuration section 'connectionStrings' cannot be read because it is missing a section declaration on my site when loading this page [URL]. The rest of the site works [URL] Setup:The server is a hosting company - Mocha Hosting. [URL] contains a phpbb forum. This has been installed via the hosting company's web tool (Plesk). There is a root web.config, but there isn't in the /forum/ folder. The forum folder has been set by the phpbb installation wizard to be a virtual directory and application - and it appears to not have asp.net configured on it. The forum worked BEFORE uploading the root web.config file, and again if i temporarily remove the root web.config.
We have an array of about 12 servers serving a website. Over the past few hours, one single server has started throwing exceptions for WebResource.axd and ScriptResource.axd requests.
Exception
System.Web.HttpException - This is an invalid script resource request.
Stack Trace
at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I have checked the web.config, machine.config for every server and they're all identical. The only difference been able to find so far is that prior to the problem commencing, the servers were patched, after which, the problematic server looks to be using different version of the System.Web.dll to the others?