Different result on devmachine and buildserver with ASP.NET (MVC 1) - c#

We have a .NET 3.5/ASP.NET MVC 1 solution. Everything works great on the developer machines but after that build starts on the build server we get:
"Only Content controls are allowed directly in a content page that contains Content controls."
For example
<error code="ASPPARSE" file="/temp/Views/Account/ChangePasswordSuccess.aspx" line="4" column="0" timeStamp="10/10/2011 01:25:46">
<![CDATA[Only Content controls are allowed directly in a content page that contains Content controls.]]>
</error>
Same ASP.NET MVC, same .NET. Visual Studio 2008 is not installed on the buildserver.
Any idea?
Environment
Build server: CC.NET 1.6
OS: Windows 2003 R2 SP2
IIS 6

Yeah. You build server likely builds a prod build, visual studio likely builds a dev build. The security restrictions and other configurations for these are likely different.
In visual studio, switch the build target off of debug and see if it still happens

That must be failing on the developer's machine, just that it does while trying to show the corresponding view / not while building it.
Have the developer build with it turned on, and locate the view that's failing the build.
Update: actually, I didn't pay close attention to the message, it is very likely you just have a page that uses a master page and has content Outside the content controls.

As i have seen according to your message there may some layout related problem in your page. which generates some html contents at run time...
have look on this asp.net forum post.
http://forums.asp.net/t/1251873.aspx/1
as Munim Abdul said, it may be possible in that way but i do not think it is the issue with an experienced person like you..
I have faced this error when i was learning sharepoint and in normal asp.net applications..
search out.. may be this will help you little bit..

Related

Adding Presentation dlls to asp.net (with telerik controls) web app causes problems

I am having some problems with my production asp.net v4.5.2 website when I add new dlls. I am developing on a standalone laptop with Visual Studio 2017 and I just added some telerik document processing library functions that need the PresentationCore and PresentationFramework dlls. On my development machine there was no problem, added the "add assembly" line to my web.config and added the reference in Visual Studio and it worked fine. I added the dlls to the bin folder on the production environment (2008r2 IIS 7.0), uploaded the new code and modified that web.config accordingly now it works but my users are randomly having controls and pictures not load and getting kicked out of the website with a 403 access is forbidden error. The users get kicked out after going through CAC authentication (production is a military server). Sometimes it's right after they login (CAC authenticate) sometimes there a few minutes into doing stuff and then bam, a control doesn't load or the 403 error pops. This happens in both Chrome and IE. The controls or pictures not loading generally are fixed with a refresh (not always though) but the 403 error the users have to reboot their machine to fix. I've even had them clear the browsing data (cache, cookies and ssl state) but they still have to reboot.
When I take those dlls out of the bin folder the problems go away. Google seems to always point to Visual Studio answers and the closest things I found here are adding custom .dll class library to asp.net/C# website and How do references work in ASP.NET WebForms websites (not web applications)? Which didn't help. I think you should also know that I have 2.5 years experience in professional coding and system administration and I am the Lead/Senior (and only) developer and the Sys Admin for this project, please use small words for me. Thanks for any help you can provide.
I figure out what was happening and it wasn't the dlls. Turns out the I was missing a CSS file which caused 404 errors and when enough of those piled up the web app would crash or IIS would give a 403 error. I found this by looking at the event logs for IIS on our production test site. It was so hard to find because that CSS was for 1 particular control and if you didn't navigate to the page with that control enough times it worked fine. I thought it was the dlls because I just added functionality to that control that required them and without that functionality the control was not used as much and so wasn't loaded enough times to cause the error.
Not sure why Visual Studio didn't say anything about the missing file but once I removed the call for that CSS file everything worked as expected. I took over this particular code recently and no other place in code are there custom CSS files so I never noticed the call for it. Luckily IIS is set to log everything.

Missing some of web development utilities in VS2017

I asked question yesterday, which wasn't answered. I gathered some more details and now I am able to ask it more specifically.
Generally, I have two PCs: PC1 and PC2. On both I have VS2017 Community installed. On PC1 everything works just fine.
It's PC2 I have concerns with. First of all, I miss all Razor templates. I can't create ASP.NET project with Razor Views, if I create empty web project, I can't add Razor View (cshtml file). To be clear - I can do everything on PC1.
Secondly, on PC1 I have below option, on PC2 I don't:
I have Web development kit installed in both VS's. I don't know what is wrong.
Edit
Here's what I get when I navigate to Web->Web site in New project window:
Your PC2 is probably on a newer version of VS c17 with the update explained in this blog post:
Visual Studio 2017 Version 15.5 Preview
Creating ASP.NET Web Applications: We’ve rearranged the ASP.NET project creation menu items a little bit to improve discoverability and increase the likelihood that you’ll choose the right project type for what you’re trying to do. Now, the commands to create a Web Applications or a Web Site are visually next to each other in the File->New Project dialog. This should help the majority of people discover the Create a New Web Application path correctly the first time.
Should just have to go File>New>Projects... then there will be a Web Site option under Web

ASP.NET MVC Core Deployment via Visual Studio does not work

I am sorry to ask a question which doesn't have a specific problem, but I would be more than grateful if you could point the problem. (I can always provide other parts of my code which would be relevant to my question)
I am using Visual Studio to create my web application with ASP.NET MVC Core. All is good with the project and I can make it work on my localhost.
I bought a third party hosting service with Windows hosting (Plesk) and as far as I've asked them, they said their hosting plan supports ASP.NET Core.
For the deployment part, I've literally searched each and every source and tried various different methods but could not properly upload my files on ftp. Trying ASP.NET Core 1.0.0 version worked well and I uploaded a sample website, but since I am working with ASP.NET Core 1.1.0 now, I am unable to find a solution.
Here is what my publish profile looks like before hitting publish button:
I'm not really sure if I filled all the information correctly, but validation seems to work well.
And here is the log which I get after trying the publish via ftp method in visual studio:
Even though it seems to succeed, when I look at my ftp directory after this process, the files in visual studio project were never uploaded in the directory.
Any help is appreciated, thanks.
I have deploy the same on my server and it is working fine see the attached screenshot.

Allow others to view local IIS7 ASP web application

I'm working on a Visual Studio 2012 web application, and need to allow colleagues to view the current website by my IP address (while I would access it my localhost). It appears that hosting the site locally through IIS7 and allowing others to access it by my local IP the simplest method. After troubleshooting and experimenting for a day though, I still don't understand the relationship between an IIS7 site/website/application and Visual Studio web application, and the MSDN explanations are really hard to follow.
Basically, I'm trying to understand:
1) How to set up a IIS website and application (should the 'physical path' be the VS solution folder or deployment package .zip folder?, for example)
2) How to most simply deploy the web application (e.g. File System/ Web Deploy/ Web Package, etc.) and
3) The order to do all of this.
I'm running VS as administrator, my port 80 is open, and have IIS7 set to use .NET v4, yet when I publish the selection using File System in VS2012 to my C drive, the resulting site gets a HTTP:500 error, with no source code underneath. (Also, before even publishing, setting the solution to use my Local IIS instead of IIS Express and previewing results in a blank page). If there is a better way to do this please let me know.
Thanks in advance.
If you don't want to learn (or bother) with the details of setting it up, you can use a small utility like 'ngrok' that will allow others to view your website at 'localhost'.
Takes about 5 minutes to learn and get up and running (and its free).
https://ngrok.com/

Web site reports xxx does not exist in current context after upgrade to VS2008 Sp1

I just upgraded to VS2008 Sp1, and I have a weird issue going on. I get a lot of errors from my code behind pages indicating that a control doesn't exist in the current context and I am also getting an errors that the pages do not have methods.
It seems like ide is trying to compile the c# code without compiling the aspx code.
The site runs fine via both IIS and Visual Web Developer, and in fact when I open up the code behind page, all the errors go away. Anyone have any idea why VS2008 SP1 is behaving this way?
I am using C#, and the Web Site project mode.
Check to make sure you are targeting the correct version of the .NET Framework. You can view this in the properties of the Solution file.
VS2008 allows you to target multiple framework versions.
Also check the Web.config, I know there can be differences between VS Web Developer and VS Standard/Pro with the web config. Maybe copy a fresh web.config file into the project.
There is a KB Article and Hotfix for what sounds like might be my issue. I'll test this and update my answer if it was my specific problem but the behavior matches. I need to improve my google skills..should have found this via google.
This patch resolved my issue, weird

Categories