How to enable User to surf during ASP.NET DLL upload - asp.net

I am using ASP.NET as the backend for windows phone browser. Sometime I need to make changes on the ASP.NET Pages WHILE users are surfing the website. I want to know how can I provide un-interrupted service to user in such a way they can surf during ASP.NET DLL uploading process:
Assume
say, there are a few ASP.NET (DLL) in production WebServer in such a way that all aspx pages in the one Folder and all DLL(s) in bin-folder.
page(1).aspx , page(1.2).aspx , page(1.n).aspx from DLL(1) and page(2.1).aspx, page(2.2) from DLL(2)
default.aspx from DLL(1)
Question
What will happen if I upload the updated DLL(2) to the production server and leave DLL(1) as it is :
Can user call the deafult.aspx?
Will user still be able to call aspx pages from DLL(1) during the uploading process?

I am a big fan of Martin Fowler's Blue Green Deployment methodology (link).
The idea is simple, have two very similar environments setup (staging & production). You make changes to your code, deploy it on staging, do your testing and then swap staging with production via a simple router configuration.
It has worked great for us so far.

The answer to both the questions is YES

You need Microsoft Web Deployment Tool. Please find more details on below link
How to deploy an ASP.NET Application with zero downtime

Are you hosting within a clustered server environment? If your not, I would be more concerned about a single point of failure rather than interrupting clients briefly during a release.
That said, the update process in such an environment is much better if your fearful of disturbing your users.

Related

How to find issue on remote server that you don't have access to?

Ok, so this is my dilemma... I have an ASP.NET MVC site that is running into some conditions that it is pegging the processor on the iss boxes it's running on. I don't have access to these servers (it's a farm of about 5 iis6 boxes behind a netscalar). I am doing some logging to a sql database, but the problem is that when the cpu pegs my database starts timing out. The iis servers are hosted in house, but I can't get access to them.
And to make things ever more complicated, I can't reproduce any of these issues in my qa environment (which I don't have access to either). QA is setup to similarly to our prod environment, but it runs on a single box that isn't behind a netscalar.
So, any thoughts on the best way to try to track down where my issues lie? Thanks!
Since you are already logging to a database, why you don't log to another database, install this DB on another computer, so that when your MVC application starts killing the CPU the database won't be affected (since it is working on another computer).
or you could log to an FTP folder that you can access.
Hope I helped.
Regards.
ASP.NET Trace. Haven't used MVC, but I'm assuming it still works...
http://msdn.microsoft.com/en-us/library/y13fw6we%28VS.71%29.aspx
If you want to know what is going on with the system you could read from the event viewer programatically:
http://support.microsoft.com/kb/815314
This should help you to learn what is going on with the system. This way you can build a web interface for it and capture any info you may want to look at for what is going.

Top 10 gotchas using shared hosting with ASP.NET

I have recently started using a shared-host for my clients so see project progress or to play with a new technology for myself. I seems like every time I deploy a new project that runs fine locally, I run into something new on the shared-host.
Do you have a shared hosting deployment checklist?
What are the common problems you run into when deploying to a shared host?
Medium Trust. If you are developing code to go into a shared host, you should set your local application to run in medium trust otherwise you can almost guarantee you'll get security issues with code that executes fine in full trust but dies in a medium trust environment.
This MSDN article explains about medium trust in more detail:
http://msdn.microsoft.com/en-us/library/ms998341.aspx
They don't always offer you direct access to the database (Enterprise Manager / Management Studio).
You end up using some weird web GUI for creating database entities, which does not accept otherwise valid SQL syntax and you have to update all your queries and stored procedures to accommodate their custom changes and restrictions.
One of mine is file IO permission problems. An example being writing to a file on the web server from ASP.NET. You have to use a provided online tool to allow permission to do more than reads.
No preview site.
That is, a host based path to your web application without actually pointing the DNS to it.
Example:
http://www234.your-shared-host.com/preview/user/bla/default.aspx (don't try it, it's just an example..)
Inconvenient cancellation procedure
In some of the shared hosts I used, I found out that for cancellation I must make a phone call. Nothing over the web, not even an email.
I bet the host thinks most people won't bother calling until it's really needed. They're right.

ASP.net user management and GoDaddy shared hosting

I'm trying to use the asp.net (3.5) built in user management framework but I'm not 100% sure how to do this on godaddy. Google didn't help much, anyone have experience with this?
You can roll your own or find one. You cannot run the Asp.net configuration tool directly against your GoDaddy account. (If you notice, it's just another asp.net website runing in another dev web server via Visual Studio).
You can use the System.Web.Security.Membership and Roles static classes in the Membership Provider to hook into it. This is very easy to do. Membership.GetUsers(), etc.
You can also use the stored procs to manually add/remove users and roles.
-Nathan
Go to your hosting control center
in menu Content on top, go to IIS Management,
there will be list of web folder,
on top of the list you can see asp.net runtime versions and (modify) link in brackets, click on it. There you'll see if you are using asp.net 3.5.
I have also had this problem. About a year ago. So I am curious to know what the solution might be, if there is one! I was told by Go Daddy, back then, that they had ASP.net admin stuff "locked down" pretty tight. I went back and forth with their help people, who had to actually escalate it - because the general help team didnt understand what I was asking. What I ultimately did was I canceled my hosting service (they did give me a refund for unused time!) and I went over to a different host. Hope this helps and I will be listening carefully to responses as I am curious to see if they changed OR if someone has a workaround.
To get the tables that the membership provider uses, look in %WINDIR\Microsoft.NET\Framework\v2.0.50727. That is where the SQL statements used by the wizard are located. Also, check out:
http://www.asp.net/Learn/Security/tutorial-04-vb.aspx
for a more thorough explaination of how memberships tables are set up. You can do all the same work that the admin tool does, just not in a GUI format.

How to write an offline version of an AJAX/ASP.NET web application

We have a web application that uses AJAX to talk to an ASP.NET web service. We would like to write another version that can be used offline. We need to be able to re-use our existing code as much as possible. What approaches should we consider?
The app is currently using XmlHttpRequest to get dynamic data from the server. Obviously the offline version will not be able to talk to the server, but it does need to talk to something! I'm sure installing IIS or Cassini on the client would work, but I was hoping for a simpler solution. Is there no other way for JavaScript to talk to some external code?
There are plenty offline web apps nowaday. It simply evolve from AJAX.
For example:
WoaS (wiki on a stick / stickwiki), Tiddly Wiki,
Google doc and Gmail is going to be offline.
You don't need a webserver to run these webapps in offline mode. Just store the required data, scripts on the client side (usually as XML).
One of the possibilities would be to use Cassini. This is a web server that acts as a host for the ASP.Net runtime. You can host Cassini in a Windows application or a Windows Service. In this scenario you do not have to rewrite the web app and the web service.
Most other solutions do require a rewrite of both your web app and your web service. Depending on the way you have written the existing app you can reuse more or less code.
Have you considered HTML5 with application cache and offline storage?
If you hope to create an "offline" version of your package your biggest issue by far will be the need to install your site into a local copy of IIS (registering a virtual directory, etc.). I pursued this briefly a few years ago and gave up in frustration. It can be done: a number of software vendors such as DevExpress do this so you have local copies of their demonstration projects. Indeed, I was able to do this. The problem was the classic "it works on my computer" syndrome. There was simply no way to guarantee that most of my end-users had anywhere near the technical proficiency to make this work.
Thus, I would strongly recommend that you not pursue this path unless you have very technically proficient users and a huge support staff.
But there is one more very important question: did you abstract all data access code to a DAL? If not, then you have a lot of work to do in managing data access as well.
Update: user "Rine" has recommended Cassini. I just wanted to let you know that I pursued Cassini and another 3rd-party web server as well. I think that there are licensing issues with Cassini but may be wrong - it has been awhile. However, I do distinctly remember running into barrier after barrier with this approach and very little documentation to help me out.
if you want a web application run offline, you need a webserver (IIS for ASP) bound to the localhost (127.0.0.1) address. After this so can access your web application by typing http://127.0.0.1/ in your web browser the same way as you do online.
If your AJAX relies on XMLHttpRequest's, you can:
Make the static versions of XML's you get over XMLHttpRequest and put then into a folder on disk.
Rewrite your XMLHttpRequest URL's so that they point to files on disk.
Rewrite your XMLHttpRequest's so that they don't check status (it's always 0 for the file:// protocol.
All JScript works on file:// pages as well as on http:// ones.
Of course it's not the best way to develop static pages, but it may save you some time on rewriting.
I havent come across any framework specifically built for asp.net like the ones available for PHP or RoR.
Here is a good article by Steven to get you started with HTML 5 and ASP.Net Creating HTML 5 Offline application
Obviously the offline version will not be able to talk to the server, but it does need to talk to something!
Enter HTML5 LocalStorage. It works like a database and enables you to put data on your client. Indeed you have to rework parts of your code in javascript and transmit it to the client, but then it would work offline.
Local Storage works like this:
- Setter: window.localStorage.setItem(KEY, VALUE)
- Getter: window.localStorage.getItem(KEY)
- Remove: window.localStorage.removeItem(KEY)
To get the main page working offline you need to create a manifest. This is used to store complete sites on the client. Please refer to this for more information about manifests:
http://diveintohtml5.info/offline.html
You want to build a web application to work offline?? It can't be done.
You could split the interface code from the rest (in diferent dlls) and create a windows application to mimic the behaviour of your web application. This way you have 2 distinct user interfaces but the same code for business rules and data access.
I don't really see any other way...

ASP.NET Web App Distribution

What is the simplest way to distribute an asp.net web application? I tried to look at some of the open source asp.net projects out there to see how they distribute their apps and how they do updates and they seem rather complicated to me (not for myself to perform but for non-technical users). A lot of them entail backing up the entire installed project, deleting specific folders and save parts of their web.config. I am hoping to find a solution that will make the update process specifically as simple as possible.
Thanks.
I am working on a project with a similar requirement now. We decided to use WiX to create an installer that can be run on the server or machine where the site is installed. WiX is incredibly powerful, but takes a bit to get the hang of.
There are plenty of other open source, and paid installer technologies as well. Here is a post with some info on a few.
CommunityServer provides a setup msi that will create a virutal directory, generate the SQL database and populate it with default data. Updating for point releases though is still a manual process involving an update.sql file and having everyone download then merge binary and static file changes.
They probably could have created an update msi too, but because so many people customize CommunityServer, it is probably better to let people merge changes themselves.
Do you mean in terms of breaking up the functionality into tiers that could be handled on separate machines, e.g. having 3 servers for a 3-tier architecture where one is the DB server, one handles middleware and the other handles the requests in ASP.Net? Another point here would be in going from a web server to multiple web servers in terms of scaling up.
Or are you referring to deployment?
It's a web application, man. Serve it publicly, require registration, and move on. Isn't that the point of the web application?

Resources