Using TFS Proxy Server As Offline TFS Server - asp.net

So here is my situation. I have a laptop that I want to be able to do mobile development on. If I have to travel for a week or so I still want to be able to use TFS, however I may not be able to access my main server. I mainly code in C# .NET running Windows 7. The TFS Proxy would be on a VM running Server 2008 R2 that I would spin up while on the road.
Is it feasible to use TFS Proxy as an offline solution?

No, it only caches files (get) and only the files that have been 'get' before through this proxy server. For things like the history, check out or checkin in you need the real TFS server. It also does not cache work items.
PS: There is TFS Offline mode. Here is an old description.
EDIT
It seems the next TFS version will support this offline scenario much better. Read more about it here.

Related

Synchronization between Two SQL Server Databases, Online and Offline

We have a local intranet based Project Management tool, we built it in asp.net .net 4.0 and sql server 2008. We cannot access this system online as it is lan based, neither we want its files to be appear online. But most of the cases we and other managers need to post project on it from home, but the issue is we dont wana use this system only on online server but also local intranet should be working, live ip is not prefered in any case because of electricity issues etc. We have an idea in our mind, that if we launch the same published site on online server (dedicated vps), and people use to work on offline system, but we can make some .exe utility which will upload our latest records from offline server to online server using the internet, does sql server provide any built in functionality for this, what is the best way to do this, either with our own custom logic with windows task scheduler or .Net provides any kind of facility for that. The reason of not using this system only as online is, our employees used to upload files in GBs, and the internet is only 4MBps, which will slow down the work, also we dont want internet dependency every time, also there is security issue.
Regards
Atif
Check out Microsoft Sync Framework: http://msdn.microsoft.com/en-us/sync/bb736753

Opening ASP.net development server to world

I'm using the built in web server in Visual Studio to test some pags but I wanted to be able to connect to it from other machines to test out browsers on different platforms. I was wondering if it was possible to configure that server to listen to an external interface or if I have to throw this over to IIS. I've turned off the windows firewall so that shouldn't be an issue.
Not with the default ASP.NET Development Web Server. You could probably use Cassini if you don't want to use IIS.
I would use SVN and setup a test server to automatically have the SVN updated on the tested server.
What I have done in the past is setup a SVN repository and add my sites into it. And on the test server setup a running copy of the repository and have a scheduled task automatically update it every 5mins. This works great since I dont have to worry about ftping or any thing. Works great since I use VisualSVN and Commenting my changes is easy.

As an ASP.NET Web Developer using Visual Studio, should I have IIS installed?

We do ASP.NET Development using Visual Studio.
A discussion point we've just had is whether or not our developers should have IIS installed.
With the ASP.NET Development Server you can run your web apps without IIS. Once you're happy with everything you can then deploy it to a test server running IIS and then onto Live.
In my opinion, all developers should also have IIS installed on their own machines as that will eventually be the end platform for the application.
The arguments are basically if the developer should have as close to "live" an environment as possible, or if the developer should only have the tools they require and not be cluttered with other things.
None of this is missions critical and I'm sure everyone will have a differing opinion. I'm just interested to hear some of them!
Robin
I'm going to say unequivocally yes. IIS and Cassini are not the same and not exposing your code to production conditions can cause you problems. Better to get yourself in the habit as early as possible.
(obviously you can replace "IIS" with "Apache" or whatever your webserver tech is)
I would say that you don't need to have IIS installed, but that you should test on IIS at some point.
The Development Web Server has two "issues":
it only works for local requests
ALL requests are passed through ASP.net
Especially the second point can really open ways to shoot you in the foot. "Why can people access SuperSecretPicture.jpg? I have a Handler in my Web.config that blocks that!".
But if you know about those limitations, then I find that the Development Web Server is better to start with since you can first focus on your code and then about your environment, but YMMV.
The bottom line is if your application is served by IIS, you should be testing on IIS. If that means IIS on your local machine or a dev server is up to you.
What harm can it do having it installed? At least if you have it installed you can choose to use it or not. The day you need to debug a webservice call from an externally hosted application you don't want to be messing around installing it.
Depends - are you running server versions of windows for you dev boxes?
Because, e.g. the XP version of IIS is different from 2000/2003 server, so you'll get a different experience. Similarly, if you develop on Vista but plan to deploy on 2003, it won't be a "complete" experience.
We have IIS installed on our local machines at our work for development purposes. We need to test the web applications against IIS, but neither do we want to release it to our live server, or to our test server as that requires a lot of work. Instead, we just host it locally and everytime we modify a file through Visual Studio we can then instantly see the changes without having to go through a file copying process.
I don't think it's a bad thing at all, as long as everything's secure you'll be fine.
Ideally your test server should mirror your production server. That should go without saying. In my opinion, your dev environment should come as close as possible, while fulfilling your needs first (I prefer to keep the dev environment as self-sustaining as possible, in case I am disconnected from the network).
I have no problem using the dev server for development, and IIS (locally or remote, as the case may be) for testing - but it depends on the project requirements too. I prefer to host web services on the local IIS server, for example. YMMV.
We develop on laptops using virtual machines. This way, if the virtual OS crashes (or the host OS, for that matter) you just copy your vpc back over from the network (where we have backups) and you are good to go. also, it makes it WAY easier to run a "standard" development platform wich is as close to production as possible.
For us, we HAVE to have IIS installed, as we are developing Sharepoint '07 webparts.

Best practices for maintaining shared hosting websites with ASP.NET and SQL Server?

I've been doing PHP/MySQL websites with shared hosting providers for the last couple years. The day-to-day process is basically:
develop in Eclipse, one website per folder
upload via FileZilla, one website per folder
use PHPMyAdmin to create and manage your local and online databases and transfer data from one to another
to backup the online database I do dump of the database tables into script and copy them locally
I now want to build websites with ASP.NET with SQL Server 2008 on shared hosting providers, and am trying to get into this new paradigm, hopefully some of you can give me some pointers based on your experience and tell me what I am not doing optimally:
I've installed both the Visual Web Developer 2008 Express as well as the full version of Visual Studio 2008, both seem to be full-featured tools for developing ASP.NET sites. In terms of websites at shared hosting providers, what can you do with the full version that you can't do with the express version?
I use FileZilla to upload my sites, which seems to work fine. Do you use an external FTP program to upload your sites or do you use the "Publish" or "FTP Website" in the above IDEs?
I installed SQL Server 2008 Management Studio and can now issue SQL commands to my online SQL Server database (although I strangely can't see my database in the list on the left, I can still access it, I assume this is some rights issue with my provider, www.domainbox.de, but this provider told me to use their online manager instead, which is called "ASP.NET Enterprise Manager" which is extremely simple but at least has a "Query Box" which allows me to send queries to my database.) Is this "ASP.NET Enterprise Manager" standard with ASP.NET hosters or is there something else that is better, e.g. where you could edit your data in the grid, etc.? And I assume that with most providers you are able to manage your online SQL Server database with SQL Server Management Studio, is that correct? (I remember back in 2001 managing online SQL Server 2000 database at a shared hosting provider with Enterprise Manager and it would take literally 10 minutes for me to see my database on the left because it listed out the other 800 customer databases as well -- hopefully this has been solved by now).
How do you backup your data in your online database to local storage? (currently I would have to write code that output my data to some other format, e.g. XML or SQL Script)
And after you make a number of structural and data changes to your local database, how do you transfer those changes and the new data to your online database? (I had to install SSMS Tools [http://www.ssmstoolspack.com] to be able to dump my data into a script so that I could get it back into my online database).
So, although I've gotten most things to work, I feel like there must be better ways to go about this, better providers, better tools, etc. Would like to hear some "best practices" advice from anyone who works with ASP.NET, SQL Server and shared hosting.
For the most part, what you're doing now will work with an asp.net website.
For your development environment, I don't think you will be limited by using Visual Web Developer 2008 express for what you want to do. Here is a microsoft page that compares every version of visual studio 2008, including Visual Web Developer 2008 Express: Visual Studio 2008 Product Comparison
For deploying your website over the net, I would generall stick to deploying manually. You can use some of the automated stuff in visual studio, but your deployment will tend to be a little slower. After compiling your application, it will then delete every file in your destination website, and upload everying from scratch (uncompressed I think). Your whole site will be down while this happens. When you deploy manually you can upload just the changed files, or everything in a compressed format.
Regarding the SQL server, many shared hosting services will let you connect with some sort of local SQL management tool. However, connecting this way generally uses a lot of bandwidth so they throttle the allowed bandwidth for this way down. This is probably the performance issues you previously saw. If you can get by with it, I would use their hosted SQL tools for most of your work, but then use the management studio for anything it can't handle.
For backing up your SQL server, if your host doesn't have a way for you to perform an automatic backup then you will have to do something yourself. I would first check to see if they will allow you to at least run a SQL backup command. This will generate a .bak file of your database, but on the local database server. Most places will work with you on this, since many customers need this.
For applying changes to your database, your best bet is to script all of the changes into one sql script and run it using the remote SQL management tool. These aren't hard to write, and there are a few tools out there that will help you with it. I personally like to use Visio. It lets me compare two databases (local and remote) then generate a script to apply to the remote one with all the changes.
Good luck
As far as capabilities of VS Express vs Standard - Standard is still the better tool. It gives you a richer debugging experience, broader support for solutions/projects dependencies among other things.
These things still matter even when doing shared hosting b/c you absolutely need to debug your app (client and server side). You can do this adequately with Express with some caveats (cant attach to an arbitrary process, client side javascript debugging is a pain), Standard makes this MUCH easier.
For publishing/deploying - I would recommend 'Web Depoyment Projects' - an MSBuild extension that you can download from MS. This gives you a lot of customizability of how you want to build and deploy your website - which can include sending it to an FTP site. If you have ever used MSBuild and like it - Web Deployment Projects are the easiest hook to extend your build process with an ASP.NET website.

ASP.NET Development Server or Localhost IIS?

Currently our dev team set up all the websites they're working on in IIS on their local machine. We're thinking of switching to using the built in ASP.NET development server instead.
Is this a good idea? What are the pros / cons of using the ASP.NET dev Server? Are there any gotchas we should be aware of?
Thanks.
NB: Running on Win XP / IIS 5 / VS2005
Edit:
Didn't realise it was called Cassini.. More answers for Cassini v IIS here.
There is nothing that the ASP.NET Dev WebService can do that IIS can't (You can set breakpoints etc, just attach the VS debugger to the ASP.NET runtime).
However, the ASP.NET Dev WebService does not represent a true production environment, and as such you can get caught by gotchas that you wouldn't expect when you deploy to production.
Because of that, I mandate that all development is done using IIS on a local machine. It doesn't take much work to configure a site in IIS.
It's a very good idea. Here are some reasons for:
You no longer need admin access to your machine for web development (it can still be helpful).
It's much easier to test a quick change and continue work, and faster iteration cycles are good.
It can simplify setup and deployment of your development environments.
The XP version of IIS has limitation that are not present in the Server version that Cassini side-steps.
The only argument I know against is that there are a couple very rare edge cases where the Cassini built-in server doesn't exactly mimic IIS because you're using odd port numbers. I doubt you'll ever run into them, and using Cassini as the primary dev environment does not preclude developers from also having access to IIS on the machine. In fact, my preferred setup is Cassini first for most small work, then deploy to my local IIS for more in-depth testing before moving code back to the shared source repository.
[Edit]
Forgot about url re-writing. You do need IIS for that. And an example of a limitation of the built-in XP IIS is that you are limited to one site in XP (can have multiple applications, but that's a different thing).
I had to switch (back) to IIS for one project, because I needed to set some virtual directories which is not possible on the ASP.NET Development Web Server.
As I stated here: https://stackoverflow.com/questions/103785/what-are-the-disadvantages-of-using-cassini-instead-of-iis your developers need to be aware that Cassini runs as the local user, which is typically an admin account for developers. The development will be able to access any file or resource that their account can, which is quite different from what they will see on an IIS 6 server.
The other thing that's a pretty big gotcha is debugging web services is much easier using IIS and vdirs rather than separate Cassini instances.
I know at one point I had an issue with Authentication not working as expected on Cassini (built in development server)
Also, if you need to test things like ISAPI plugins (a re-writer for example) I'm not sure how that's done on Cassini.
The constantly changing port is also rather disconcerting to me. Also, for each web project in your solution it fires up another instance of a Casini server, and each one takes anywhere from 20 to 50 MB of memory.
I use IIS all the time, it's pretty easy to setup, and you guys are already doing that...
I've used both methods and I prefer having IIS locally vs. using the built-in server. At very least you're more consistent with the final deployment setup.
Also, when using IIS 5.1, be sure to get JetStat IIS Admin, it adds functionality that is disabled out of the box on IIS 5, such as being able to setup multiple sites.
I have run into the following limitations with the asp.net dev server:
does not support virtual dirs. If you need them in your app, IIS seems to be your only choice
Classic asp pages dont run in dev server. So if you have a mixed web app (like I have at my client right now), IIS seems to be the solution
If you need an admin UI to configure settings, IIS works better
Of course IIS requires that you be a local admin.
Another distinction I noticed is that Cassini runs as a 32-bit process and you have no control over it, whereas you can control the application pool of your IIS app to disallow 32-bit (assuming your IIS is running on a 64-bit server). This becomes especially important if your web application is going to call APIs in 64-bit processes such as SharePoint Foundation/Server 2010. When you debug your web app with Cassini as your debug server, you'll get "The Web application at url could not be found. Verify that you have typed the URL correctly" type errors when instantiating objects. If you debug using IIS with the app running in an app pool that runs as 64-bit with an identity that allows access to sharepoint database then you'll be able to debug properly.
In VS12 the development server is way slow, takes a few seconds to download a 2kbyte file. This did not happen in vs10. When you have a bunch of jquery files and css this is a real problem. Also every page requeries all the css/js files. Very very slow regression testing.
The main issue I've run into with the dev server is SerializationExceptions with custom security principals stored on the thread context. Details here.

Resources