Running Visual Studio ASP.NET project on a Mac with Parallels 6 - asp.net

I use Mac as my primary OS, but I often work on ASP.NET MVC projects. I want to use the same file system for them, and not virtual OS image.
The reason for that is because I want to integrate the projects with Mac OS (i.e. upload them to the server via Transmit, a Mac OS FTP app).
But the problem here is that ASP.NET can't really work with projects located on network drives. So when I try to run a site (either with VS 2010's built in web server or with IIS 7), I get
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.
And this is a common mistake but no solution that I could find worked for me.
If I create a project on Parallel's virtual C:\ drive, everything works fine.
P.S. I hear that VMWare has better network drives support, but is it as smooth as Parallels? Parallels 6 runs extremely fast for me, and my Mac Mini doesn't even get warm with VS 2010 and several other Mac apps open.
P.P.S. I also heard about using DropBox and/or Windows Live Mesh. Is clouding a good idea in this case?
Thank you

You're creating an awful lot of pain for yourself if you want to do all this this just because you want to use a Mac FTP client to deploy your sites/applications.
Visual Studio 2010 contains Publishing tools which make deployment much easier (and are smarter) than just ftp. I suggest you have a play with them and then see if you still want to go down this dark, bumpy and dangerous path :-)

Related

How to run asp.net WebForms published site locally from visual studio code

How to open a published webform site from within visual studio code. opening and running the default.aspx in browser locally
The site is published by Visual Studio 2019 ( not Visual Studio Code ) to local folder, I want to open and run that published site from another computer having Visual Studio Code only.
Well, to run, show and display a web site, you need to have a web server installed, and then up and running on that computer.
You then need to configure the web server, and what folder or where the web site is published to. However, for reasons of security, often the folders that the web site can see (or use) is VERY restricted. I mean, do you want the whole world messing around in folders on that computer? (not!!!!).
You then need to open up the fire walls, and set rules to allow external use of that given computer.
Now, it turns out, that Visual Studio is able to "debug + launch" your web site during development. This works be having installed a light weight (stripped down) version of a Web server.
So, VS uses what is called IIS Express. It does have VERY high degree of compatibility with IIS
So full version = IIS (Internet Information Services)
Light version = IIS (Internet Information Services Express).
So then, the REAL question is can you setup + use IIS Express (that is ALREADY installed on your computer as a result of installing VS)?
The answer is yes, but it is REALLY but REALLY painfull.
And the reason why? Well, to run + launch IIS express for JUST you the developer, then things like security, rights policies, file access, is http and https etc. setup? Well that is a HUGE FAT BOOK of reading and a HUGE FAT BOOK of massive amounts of configuring required to setup + run a whole web server.
I mean, you do have web.config. But the sheer mass of options available is quite a challenge to setup.
And IIS express does NOT have the main setup and configuring screens included.
So, for hitting f5 to run from Visual Studio? great!!!
But, you need screens like this:
And from above, we have a LOT of stuff:
So, the problem is that IIS Express does NOT include the above management screens.
So, this means that YOU HAVE to edit web config and other config files that are required to run + setup IIS.
Now, to be fair, you could just run with the SAME defaults that VS uses when you hit F5 to run. But the configuring of the web site can be a hassile. (for example, did and do you know WHERE to set the IP address of the web site?
When you run local, then VS uses "localhost". But for anyone else on the network, they now have to use that computers IP address, and then YOU must setup the web server to accept requests to that IP address. And you don't even have to use + give the web server the same IP address as the computer hosting IIS.
So, you CAN use IIS Express, but it going to be panful beyond ANY thing but using IIS Express for debugging your web site on the SAME computer running VS. Remember when running IIS on the SAME developer computer, then you are the "owner" or what we call 'super user' of your OWN computer. But, I can't just start opening files and using YOUR computer right now, can I? (see the difference!!! - allowing OHTERS to use your computer is a really big deal.
But, yes, you can get IIS Express to work. it just that IIS Express is MISSING all the above management screens. (and that above screen shot shows that each one of those icons when chosen is a "big maze" of options.
To get this to work can be done.
I don't have a good reference, and you have to google it, and then with a pot of coffee, read away, since without the configing menus and systems above, you find this to be difficult.
Here is one such article on how to do this:
https://blogs.blackmarble.co.uk/rfennell/2011/03/22/how-to-expose-iis-express-to-external-network-connections-and-use-a-non-self-signed-certificate/#:~:text=%20How%20to%20expose%20IIS%20Express%20to%20external,You%20now%20need%20to%20just%20start...%20More%20

can't find IIS 7.5 after resetting the user

This may be the dumbest question but I have a small problem I am using windows7 and recently I had an issue with my outlook as a result I had to recreate my profile on windows.
since that moment I can't see IIS7.5
I have also tried to use control pannel add windwos feature and I can only find IIS6
The strange thing about this is that I have files hosted in IIS7.5 and when I browse to the web Url(I use custom host) I can go there but creating a new website is impossible as I can't go to IIS 7.5
also browsing to Localhost gives me the indication that IIS7 is installed
What can I do?
I have tried also using the script from Microsoft site link but that wasn't successful and I am wondering what to do really.
also when I type Localhost on any browser I get the big image with IIS7 on it what suggest it is installed.
Just today using manage mycomputer(Win 7), service and application and restarted the IIS Admin service and now I can see the IIS7.5 as per the , but not sure why I can't see it in the accessories on when I do a search for IIS
Thanks
You could always download IIS 7.5 express from Microsoft
There is a similar post in super user forum discussing about the posted issue.
https://superuser.com/questions/752946/iis-manager-disappeared-from-start-menu-and-administrative-tools
Copied from there:
Your system is behaving in an abnormal manner, and it is hard to diagnose that error. It seems like it is caused by some system corruption.
The following tools can diagnose and fix errors in Windows :
sfc /scannow
Scans the integrity of all protected Windows 7 system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible.
System Update Readiness Tool for Windows
Scans for Windows corruption errors that prevent Windows updates and service packs from installing.
Windows 7 Upgrade Advisor
Scans hardware, devices, and installed programs for known compatibility issues, giving guidance on how to resolve potential issues found, and recommends what to do.
Windows Update fixit or Reset Windows Update components
then try again to turn off the IIS Windows feature, reboot, reinstall, reboot.
Full antivirus scan by your current product and in addition at least Malwarebytes Anti-Malware.
If running these tools gives no hint as to the problem, the next step is a Repair Install to Fix Windows 7, which fixes the current installation of Windows while preserving user accounts, data, programs, and system drivers.
The last resort, to reinstall Windows from scratch, is not to be taken lightly unless really necessary.

How does running ASP.Net on Linux compare to the standard Microsoft-centric solution?

I know its possible to develop and host an ASP.Net site on Linux using Mono and Apache, but I'd like to know how well it works and if its worth the hassle? I prefer open source, but for this project I want the quickest, easiest, most reliable solution.
The site I'll be building will be a fairly basic ASP.Net site using MySQL.
I'd like to know if anyone else has experience using Mono in a situation like mine and how the project went. How did it compare to using a Microsoft-centric solution?
I know Mono is still somewhat incomplete, but I'm hoping I won't need the features it lacks.
This question may be a bit "polarizing". Most similar questions seem to have responses from people who are either very pro-Microsoft or pro-Linux. I'm hoping for some unbiased responses, preferably from people with experience using both.
I switched from MS-centric solutions about a year and a half ago and now I'm hosting all of my websites and web projects on Linux/Mono/Apache/MySQL based virtual servers (I was originally using nginx instead of apache, but mono-fastcgi-server was randomly causing thrashing, so I choose apache as a web server). I can summarize my (subjective) experience with this configuration into a few points:
It can take some time to get used to difference between Linux and MS based environments (if you never used Linux before), but I do not regret this decision. What helped me a lot was creating installation and configuration procedures for particular technologies (for example mono parallel environments, apache virtual hosts configurations, dealing with certain issues) which are mostly repeatable and can be automated.
You can still use Visual Studio to develop your applications and then deploy them on Linux machine. If you are using this approach it's a good habit to test your apps regularly on mono for possible incompatibilities.
I deploy web applications via FTP which is probably the easiest way of doing it (well maybe WinSCP is even easier, because you don't have to set up FTP server, but it depends on your preferences).
So far I have run into 2 cases with Mono/Apache where memory leak caused unavailability of the website. This was probably caused by Boehm garbage collector which I was using on old mono installation. I haven't had similar problems with a new sgen GC on recent versions of mono.
What I like the most on mono running on Linux environment compared to MS stuff is that you don't have to click around all the time when doing administrative tasks. Shell is for me unified administrative interface which can speed up things (if you have some practice).
Hosting ASP.NET on mono from my experience is quite easy and fast. i has been host multiple of my project using Mono ASP.NET MVC 1 / 2 using MySQL and PostgreSQL, serve by Apache mod_mono.
Compared with deployment on Windows Server. It quite narrow when using modern linux distribution which already provides all package to deploy mono ASP.NET. the only drawback is you have to make sure your Web Application portable enough in term of IO accessing and only very short learning curve and experience needed to debug and publish your project.
For Deploying our project in Linux. It easy using Version Control (VS) such as Mercurial or Git if u have fully control on the server. If U have more experience using continues integration is more better. I mainly using mercurial so step bellow is the step i usually do, but i think it almost similar for Git:
Install mercurial, and configure mod_wsgi, hgweb.wsgi and hgwerb.config
Init VS repo and publish at hgweb.config and configure hook to update and invoke xbuild to automatically build when u push it
publish the repo (web part) as mono application at mod_mono.conf
So u just need to code at visual studio, commit and push your changes using tortoiseHg without event login to server (set repo url, user and password at your repo hgrc)
Please note that although you can deploy ASP on Linux via things like Mono, if you use a Microsoft ide such as Visual studio, webmatrix, or Visual web developer your licence only allows you to deploy these on Microsoft servers!

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.

How do I setup an ASP.Net/IIS dev enviroment on a Mac for my Flash developer?

No, no, I'm not getting hives ;).
I am able to run a local version of my .NET 3.5 site on IIS and troubleshoot whilst I develop. However, my flash developer is forced to log onto our Windows 2003 and mess with our staging server when he wants to see how his work is doing. This is unacceptable, I understand, but right now there are time concerns so this hack is going to have to fly for a little.
How do I set up a dev environment for my flash developer to be able to work on his local machine? I'm sure this gets done in other places.
VMWare Fusion or Parallels, or give him a virtual machine/PC that he can Remote Desktop to from his Mac.
Not to sound the fool, but isn't Flash not platform dependent? Is the flash developer doing anything more complex than connecting to a remote client to update an .swf file? You don't "need" to be running windows/iis to copy a file from mac to windows. You might try the Remote Desktop client:
http://www.microsoft.com/mac/products/remote-desktop/default.mspx
or set up an FTP account (on the staging server in question?) for him. I agree with the above about using Parallels or VMWare. It's not necessarily a "hack" or "workaround" that you can use and test on multiple platforms. It's a huge plus! As a user of VMWare and ex-parallels user, I recommend VMWare. It takes about as long as "installing windows" to be up and running on a mac, and the resources from your Mac can be available via a "documents" on the desktop (or other) if you so choose.
What kind of Mac is it? The Intel ones can run Windows natively.
Dual boot Windows on his Mac with Boot Camp?
Setup IIS in a VMWare Fusion virtual machine. Do a simplified install of Windows XP and it should run excellent.
That way you can interface with the IIS Server from Mac OS X or from other PC's from anywhere on the local network for that matter.
I use Vmware Fusion to run subversion and Apache servers and it runs beautifully.
well an alternative is the Q Emulator
What is the actual problem? As I see it, Flash dev. makes a Flash movie, and tests it locally, if it needs to communicate with the server, it does just that. If the Flash dev. wants to see it in a page, or see how it communicates with the surrounding HTML and Javascript, he uploads the file to the server using a ordinary windows share (aka Samba-share) or FTP or whathaveyou and then presto, it works.
I've just discovered http://www.virtualbox.org">VirtualBox which is a free alternative to Parallels and Bootcamp. I'm running Windows XP pro on my MacBook no problem at all - note it's for Intel Macs only though.

Resources