weird issue with visual studio 2010, right now i'm debugging a web application (which uses sitecore btw) and when entering in certain pages i get this error
Server cannot access application directory c:\svn\foo\trunk The directory does not exist or is not accessible because of security settings.
now the real fun part. c:\svn\foo\trunk is another asp.net project i worked on months ago on this same machine, with the same visual studio 2010, and they happen to both use sitecore too
besides those facts, the projects are absolutely not correlated. i deleted all the project files for foo eons ago
any idea what part of asp.net could be producing this error? what part does even know that i've used to work on this project?!
You may want to verify that your hosts file doesn't contain any strangeness, and likewise that your IIS instance doesn't contain any Applications that refer to your old codebase/directories.
Also, try running VS as administrator, and/or setting your user's permissions to admin rights.
If you are using a symbolic or junction link, make sure the folder that the symlink points to is still there.
Related
very strange that on checkout visual studio kills sessions, so when i checkout any file i have to log back in to my asp.net application again and again, its annoying :(
I have noticed above behaviour in visual studio 2010 and 2012, using it with VSS or Team Foundation Server. MSDN documentation Checkout does not have any details about such behaviour.
Wondering is it me ? or my code ? or its something Visual studio does?
anyone else is facing same problem ?
If Visual Studio detects a change in certain files, it will restart the web application if it's hosted on the internal development server (perhaps even IIS Express), which will in turn invalidate your user sessions. I'm not sure it works for every type of file, but I know it happens for me with the cshtml views since Visual Studio 2012. Obviously, like in IIS hosted web apps, a change to the web.config will cause a restart also.
Your best bet would be to externally host your site, meaning host it in IIS, not in the development server (Cassini). You can configure this in your Web Application's project properties.
There IS a workaround. I found it out by accident:
App_offline.htm created/deleted whenever I check out a file in TFS
The title is misleading; nevertheless it's all about the checkout process and the annoying session drop.
It does work for VS 2013 and VS 2015.
The answer above is so much difficult to access that it's worth creating an answer here. Thanks to the moderators for their understanding.
I'm having a lot of issues with the Visual Studio 2012 Publish feature.
I am looking an easy way to publish my Asp.Net MVC 4 application. Today I have my development machine and a web server. Every time I update the application, I have to manually copy and paste the files I want. This is a very cumbersome work.
I have tried VS2012 publish tool and encountered so many problems.
I am properly configuring ftp to work on passive mode but VS2012 keeps saying that passive mode is not activated.
Since there is no "checkbox" to alternate from passive mode to normal mode, I had to modify the xml file no set it to not operate with passive mode.
The deployment now succeeds, and now I'm receiving the following error:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\ee6c89b7\bf969ee8\App_Web_crjs1ytd.16.cs(33,0):
Error CS0234: 'The type or namespace name 'sistema_DocType' does not exist in the namespace 'gedaiapp.Models' (are you missing an assembly reference?)
There is nothing wrong with my application on my local machine and I am able to build it and run in the web server when I copy/paste the files, I do now understand why it doesn't work when I use the publish feature.
I have already tried deleting all files in the temp folder, cleaned the entire solution and project and rebuilt all.
Sorry to hear that you guys are having issues. You are correct Visual Studio does not support SFTP, but we do support FTPS.
We have an item on our uservoice site for SFTP support, but the vote count is currently very low (just has 6 votes). If you guys are interested in this support if you could vote on the item this will help me prioritize this so that we can investigate supporting this.
If you have any other feedback that you'd like to share with me regarding publishing please feel free to email me directly at sayedha[at]{MicrosoftDOTcom}.
This question is not easy to answer because it is not know if this is an internal corporate environment or a small environment and you're just copying a few files over the internet to a single server.
If you're in an internal corporate environment and have a large number of files/servers you need to copy to, you may want to look at replication (3rd party software or homegrown application).
I'm with you in that the publish tool is not up to current standards. My challenge with this tool is the lack of Secure FTP options for this application. This should be standard with any version of Visual Studio.
I'm currently using the IIS SFTP and Filezilla (SFTP) for my transport needs as the alternative to the lack of encrypted features in Visual Studio.
I'm trying to run a test version of a web using the File System (i.e. the "Cassini" web server built-in to Visual Studio 2005) rather than (IIS 5.1 on my Win XP dev PC). This web is a hodge-podge of classic ASP files written years ago and some new development in ASP.NET (VB.NET).
How can I get past this error message as it tries to go to /TestWeb/default.asp? -
Server Error in '/TestWeb' Application.
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /TestWeb/default.asp
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Things I have checked and previously encountered trying to get this mess working:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config
(has nothing for *.asp nor
HttpForbiddenHandler so nothing to
comment out).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
(has nothing for *.asp)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
(had a HTTPForbiddenHandler for
*.asp but I commented it out as per other postings advice; seemed to
have no effect for me though).
To get past an earlier error
("Request for the permission of type
'System.Web.AspNetHostingPermission'
failed"), I had to go to
"Administrative Tools > MS .Net
Framework 2.0 Configuration > My
Computer> Runtime Security Policy >
change Local Intranet to Full Trust.
To get past an earlier error ("the
network bios command limit has been
reached") I had to "enable a hot
fix" by adding the following DWORD
value at the following registry key:
HKLM\Software\Microsoft\ASP.NET\FCNMode
and set the value to 1 (per MS KB
Article 911272).
This whole web has been placed on a file server in our LAN and from my desktop VStudio2005 views it via the mapped drive letter (e.g. V:\SVNwork\myFolder\TestWeb)
Visual Studio 2005 models this as a "web site" (not a "web application project").
The remainder of this post describes some background about why I am trying this:
We tend to recreate the web site on our dev PC's which run IIS 5.1 on Win XP. Movement of new stuff into production can be awkward using WinDiff and copying files as needed.
I'm trying to implement source control over this work. I've had a heck of a time trying to configure Visual SourceSafe 2005 and local IIS to work together smoothly (interestingly, I had pretty good luck putting "web application projects" under VSS2005 so I think it's related to the awkwardness of the ASP.NET 2.0 "site" model and VSS).
Anyway, I've moved a development version of this classic ASP and ASP.NET to a common file server in our LAN. Before placing this under Subversion control as a working copy of it's equivalent imported into a repository, I just want to make sure it can work with the Cassini web server. That's where I am stuck. The ultimate goal is have this under SVN and view differences with TortoiseSVN.
Thanks for reading this far...hopefully someone can get me past this error and then I can move forward with the SVN and TortoiseSVN work.
Cassini doesn't, as far as I can tell, support classic ASP. An alternative would be to run a local install of Apache (since you can't/won't use IIS) which will host ASP, but is probably asking for trouble.
See also: http://blogs.msdn.com/mikhailarkhipov/archive/2005/06/24/432308.aspx
You could also run local IIS, which will, of course, host both ASP.NET and classic ASP. Visual Studio can easily be configured to debug with a local IIS install.
Points for moving to subversion: we use the Microsoft stack (Visual Studio, ASP.NET, SQL Server) with subversion and it works very well.
Subversion comment
GRRR.. bosses are fun. The svn model is known as copy/modify/merge. The repository lives in a central location - probably your file server. Using the svn client - or a Visual Studio plugin like the excellent AnkhSVN - each developer gets a LOCAL working copy,makes their changes and performs a "commit" when they're done working on a file.
SVN takes care of making sure that developers don't overwrite each others changes, provides a facility for merging changes when someone has modified a file between when you got your last copy and when you commit your changes, etc.
The whole point of a working copy is that it isolates developers from each other. The merge/commit step takes care of intergrating everyones changes. Having a central working copy that everyone works from defeats the purpose.
This is a very different approach than that used by Visual SourceSafe, which is basically a file locking mechanism. The fact that SVN is a real client-server application (where VSS is simply a disk-based "database" with no server app to administer it) provides all sorts of capabilities. We check out, modify, commit, then publish from svn to a dev server.
Also, if I remember correctly, Cassini won't server apps from a mapped drive.
Another beginner question for ASP.NET:
I'm starting an ASP.NET project in Visual Studio 2008, and would like to link it to a folder on a remote server (as in it builds/publishes to this folder). It may be my phrasing, but I cannot seem to figure out how to do this (even with Google at my side!).
I naively tried to just upload the code files to the server, but running my code produces errors related to the fact that the pages are not set up as an application.
Any help would be appreciated (or a link to a resource where i could learn more about this basic asp.net/vs08 stuff I keep running into).
On your web server the folder you copied your files into needs to be set up as an application or a virtual directory. This is done through the Internet Information Service panel found in the "Administrative Tools" off the Control Panel.
Depending what flavor of IIS you are using the procedure may differ.
Visual Studio 2008 has a publish feature. If you right-click on the web project there is a "Publish" option. You can then select where you want to Publish your files.
2 fast answers:
You can use the Publish option in Visual Studio and create a folder inside wwwroot to publish
Alternatively, you can create a simple setup program. Just add a new "web setup project" to the solution and add the results of the web site to the setup project.
And of course, have you tried googling asp.net deployment to get some help?
Good luck! :)
You will love Visual Studio 2010, which should be out in early 2010, if it follows previous versions. This would also mean an MSDN release a few months earlier. Why? Better deploy story.
As for where we are today, you can publish and have a directory created. You will have to publish to IIS instead of a directory to accomplish this. This means you have to have permissions to add a web app and publish to it.
For a directory, you will have to create the app in the IIS Manager. If you do not have access, try the IIS admin. If you cannot get them to do it, you are back to publish.
Since, for various reasons, I can't use IIS for an ASP.NET website I'm developing, I run Cassini from the command line to test the site. However, after installing Visual Studio 2008 SP1, I get a System.Net.Sockets.SocketException when I try to start up the web server. Is anyone else having this problem, and if so, how did you fix it?
Is there anything in the Application section of the event log?
Have you tried using a different port?
Per this thread, try:
Unbind from Visual Source safe, delete the web project from the solution, rename the folder where the website is stored and then re add to the solution as an existing web site and then bind to source safe again.
There may be some incorrect info in your .suo or .sln file. You can safely rename the former, as it is user-specific (solution user options); the latter (the solution itself) would be a bit more of a hassle to recreate.