MVC :: Application Not Recognized By Web Server?
Sep 7, 2010
I uploaded my MVC2 application to my web hoster, but the web site does not run. When I request www.mysite.com, I just see the directory listing page of the root directory, and the web app does not execute. I don't see any error message, though. A normal Web Forms page works fine. Why is this?
The web server is running ASP.NET 3.5 SP1. It does not have the MVC assembly installed in GAC, so I followed these instructions to upload the MVC assembly with my page: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx , but to no avail.
View 9 Replies
Similar Messages:
Mar 9, 2011
I recently deployed a MVC app to our production server for some testing and it doesn't seem to recognize any of the posts. For example, I may have the following method:
[Code]....
However, nothing happens. Everything works on my local machine when testing. I've even tried placing a simple Response.Write("Anything happening?") inside the method, removing all other code, and nothing is printed to the screen.
View 10 Replies
Nov 22, 2010
I would like to know how to format a string date so it can be inserted in a DataTime field in MS SQL 2005 using ASP.NET 3.5 with C#.
I have a form with 3 Dropdownlists; 1 for selecting days(1 to 31), 1 for month (1 to 12) and 1 for years (say 1980 to 2010).
When the form is submitted, I want to join the selected values from the dropdownlist as a string ( say dd/mm/yyyy) and insert that into a datetime field in a database table.
I am using the following code, but I get the error message "String was not recognized as a valid DateTime." when i submit my form.
[Code]....
View 9 Replies
Feb 4, 2011
When i created a simple site via Matrix which adopts Razor technology by default, i found site automatically display "default.cshtml" if started through "http://localhost:xxxx/bread/" ; however i hadn't set "default.cshtml" as "default document" for this site, even i seek in the "applicationhost.config" i just find
<defaultDocument enabled="true">
<files>
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
which apparently hasn't "...cshtml" yet. So I am wondering now why in this case the web server actively sets "default.cshtml" as default start page ?
View 5 Replies
Jan 27, 2010
I'm experiencing a to me mysterious error when sending e-mails through a SMTP-server from an ASP.NET web application. I get the famous error "unable to relay for xxx@yyy.zzz". What's mysterious to me is that when I cut and paste the exact same code that sends the e-mail into an usual .NET Windows Forms application, send the e-mail with this application, it all works just fine. This made me think that perhaps the problem is that the ASP.NET application runs as NETWORK SERVICE while the Windows Forms application runs on a domain user account, but it turns out that I have another ASP.NET application sending e-mail through the same SMTP-server running under NETWORK SERVER at the same IIS, and this application does not experience this problem.
I've further tried to send e-mails through the SMTP-server manually by telnet the smtp-server on port 25 and running the SMTP-protocol manually, and it all works fine. The SMTP-server is not configured with any kind of authentication or SSL.
Another mysterious fact is that the ASP.NET application can send e-mails from an adress within the same domain to an e-mail adress within the same domain, but not to any adress outside of the domain. But the Windows Forms application, that uses the exact same code, can send e-mails from any adress to any adress both within AND outside of the domain.
So to summarize:
The ASP.NET application can send
e-mails from addresses within the
domain to adresses within the domain,
but not to addresses outside of the
domain.
A Windows Forms application running
the same code on the same computer
can send e-mails from ANY address to
ANY address.
Another ASP.NET application on the
same IIS running under the same
account (NETWORK SERVICE) can send
e-mails using the same SMTP-server
from ANY adress to ANY adress.
There is no authentication configured
on the SMTP-Server.
Both the ASP.NET application and the
Windows Forms application utilizes
the System.Net.Mail.SmtpClient class
to send a
System.Net.Mail.MailMessage.
The code that sends the e-mail massage is:
private void button1_Click(object sender, EventArgs e)
{
MailMessage mesasge = new MailMessage(txtFrom.Text, txtTo.Text, "Test mail", txtBody.Text);
SmtpClient client = new SmtpClient();
if (!(string.IsNullOrEmpty(txtUserName.Text))) //Is false since txtUserName.Text is empty
client.Credentials = new System.Net.NetworkCredential(txtUserName.Text, txtPassword.Text);
client.EnableSsl = false;
client.Host = txtServer.Text;
client.Port = 25;
try
{
client.Send(mesasge);
}
catch (Exception ex)
{
txtResponse.Text = ex.Message;
}
}
As far as I can understand, this should be a matter of configuration rather than coding issues.
View 2 Replies
Jul 7, 2010
Question: I created an ASP.NET web application. Now it originally was meant for deployment on a webserver.
That is working, so, so far so good. My question now is: Is it possible to deploy it as a desktop-application, too? That is to say the installer installs some kind of server, plus the web application, configures the server to run this application on a localhost URL, and then creates a link in the start menu/desktop, where it opens that url (website, the application) on localhost in a web browser?
I think it should be possible, though the server wouldn't be IIS, because this is a windows component which can't be separately installed. Is there anything like this already out there? The nonplusultra would be that it only starts the server when you click on the shortcut.
View 4 Replies
Jul 21, 2010
i have classes of my web application only the default one work if i for example click a link to go to another class i get this error for each class this happens . But only on the web server WHy ?
Server Error in '/' Application.
Parser Error
Description:An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'WebApplication2.Login2'.
Source Error:[Code]....
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login2.aspx.cs" Inherits="WebApplication2.Login2" %>Line 2: Line 3:
Source File: /Login2.aspx Line: 1
View 4 Replies
Apr 8, 2010
I read a xml file (myConfig.config) and provide it as an input to a CLR method. When I make changes to this xml file, it doesn't seem to be recognizing it. When this line throws an error, I always see the first version of the file as a part of the error message.In the config file properties, I have set Copy to Output Directory as Copy always, but it still doesn't seem to work.
View 2 Replies
Aug 24, 2010
I am developing a Web app that is based on ASP.NET 3.5, and i added some page from ASP.NET MVC, everything is ok, until i use the "HTML" helper class, then the page is not being able be render, because this is not recognized.
For Example : Html.BeginForm() => this is not recognize as a method
But if i used "System.Web.Mvc.Html.FormExtensions.BeginForm", which is a extension method itself, it work fine.
Environment : ASP.NET MVC 2 and ASP.NET 3.5
View 1 Replies
Mar 10, 2011
I am trying to use ViewBag and in my Controller I am having the code [Code]....
View 3 Replies
May 14, 2010
I have written a program that interprets bar charts on the web and converts them into textual summaries. It is blind and visually impaired get more information during their web surfing. Anyways, right now all of the processing is handled on the user's machine and it is a very resource intensive program. So, I wanted to make it so the main computation was done by a server so that the user could simply click on a graph and get the summary instead of waiting while the computation was being done. Does anyone have a clue how to tackle this problem? If you need more information let me know.
View 8 Replies
Feb 21, 2011
I have an application that runs perfectly fine locally using the VS 2010 application server, however, when I deploy to our web app machine startup just spins and spins and never loads. We have other apps on this same machine that load just fine (this is a debug deployment of same app in product). I have been spinning my wheels on this for days and I am at a loss as the problem could be. Here is what I did
1) Create a new directory (same level as other apps)
2) Copied over our existing test ([URL]) and it works fine
3) Build and publish new debug app ([URL]) and it just spins trying to load first form.
I know the diretory is "working" as the 'test' application I put there works fine.
View 3 Replies
Apr 30, 2010
i have an error is follows..
String was not recognized as a valid DateTime.
i am using three controll for getting date..
dropdownlist1 for getting day..
dropdownlist2 for getting month..
textboxx for year..
the code is..but i cant defined solution..
DateTime dt1 = DateTime.ParseExact(fromString, "MM/dd/yyyy ", fculture, DateTimeStyles.NoCurrentDateDefault);
View 9 Replies
May 15, 2010
FeatureEvents.bit_Activate = Convert.ToBoolean(collection["bit_Activate"]);
bit_Activate is checkbox ,how would i convert it to boolean above,collection is coming from the formcollection variable
View 4 Replies
Mar 12, 2010
I just wrote this into my WebForms .aspx:
<span id="GenerateChartButton" runat="server"></span>
I went to the code-behind, and typed this:
this.GenerateChartButton
and it's not recognising that I added the span to the page. Is there something I need to do to make this happen? I have been working in MVC lately, so I haven't had to worry about the relationship between the page & code-behind in a while, but I can't remember any tricks that I had to perform to reference a HTML element in my code.
View 1 Replies
Jun 12, 2010
I just installed the release version of Visual Studio 2010, and it looks like there's something wrong with the standard ASP.NET server controls. When I create a basic server control, such as a TextBox, the editor underlines it in green and says (I also get no intellisense for ASP.NET controls): Element 'TextBox' is not a known element. This can occur if there is a compilation error in the Web site, or the Web.config file is missing. The web site builds fine, and the Web.config file is not missing:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
</configuration>
The controls work just fine in the code-behind, and they function correctly when I run the site. Is there some configuration problem here?
View 1 Replies
Jan 14, 2011
I created a new page in an existing project. The existing pages are still good, but the new page is having problems at runtime. The problem is that controls are not recognized and throw a "object reference not found" error. I even tried Page.FindControl and that didn't work either. This is only happening with this page. The controls are recognized at design time, and are not recognized only at runtime.
The controls were copied from a regular Web form into a content form with a master page. They worked fine when in the regular web form. Could that be the issue?
I tried creating a new page and moving the controls over, but that didn't fix the problem. I also tried deleting the designer file and recreating it (using convert to web application) but that didn't resolve it either. I'm out of ideas here. Here is the page directive and the first control that is not recognized.
<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="default_grid.aspx.cs" Inherits="TestItemDevelopment.default_grid" %>
<asp:Content ID="Content4" ContentPlaceHolderID="mainContentHolder" runat="server">
View 2 Replies
Jan 2, 2010
I'm using the UrlRewriting module on my site and I can't seem to get HttpContext.Current.Request.IsAuthenticated to return "true" on any rewritten pages.
If I go to my home page (http://localhost/default.aspx) I get "true", but if I go to something like (http://localhost/contactus) I am always getting "false".
also, for a direct example, I have an edit bar that is supposed to appear to anyone who is authenticated. The if statement fires in the Page_Load method
If HttpContext.Current.Request.IsAuthenticated Then _
Me.FindControl("EditBar").Visible = True
I have also tried putting this in the page load event
Response.Write(HttpContext.Current.Request.IsAuthenticated.ToString)
Every page that is rewritten says "False" where pages that are not rewritten say "True".
View 3 Replies
Oct 27, 2010
The error points to this line: DateTime tmpDate = Convert.ToDateTime(lblCalendarDate.Text).AddDays(-7);
I know it will be something to do with I have the date as a string in one method and the date as date in another method but I don't know how to rectify this seeing as I'm knew to ASP.Net & C#. Here is the code:
[Code]....
View 6 Replies
Aug 6, 2010
[Code]....
Attribute not recognized 'setProcedure' ?
View 2 Replies
Apr 9, 2010
I have an assembly that i have built with a linq to SQL item, a web reference and a class that brings it all together.I build the project and it all seems fine but when i reference the object from another project the web reference and linq objects are available but the class isnt.
View 2 Replies
Dec 17, 2010
I have a nested repeater set up but the child repeater control is not being recognised in the code behind. It's not even being added to the designer file. I've tried this on an aspx and an ascx page but both gives the same problem.
<asp:Repeater ID="RepeaterParent" runat="server">
<ItemTemplate>
<asp:Repeater ID="RepeaterChild" runat="server">
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
with this on the page the code behind only recognises the RepeaterParent but not RepeaterChild.
View 2 Replies
Jul 27, 2011
I've just started a new website, downloaded a free theme from some website and I'm trying to implement that into an ASP.NET web application.
I simply copy/pasted the CSS and I'm now bringing in parts of the webpage bit by bit, starting with the header and title, then a menu bar, a ContentContainer and finally the footer.
When in the VS designer the page looks fine. The background image for the header shows up, the menu bar has its own designated space and separate background image, and the content is separated from the rest by a wide margin.
When I run the web application however, it looks nowhere like that in my browser. The header and menu background images are gone; the margin around the content is gone, etc. It seems about half the style elements are intact while the other half is somehow missing.
Things I've done and tried:
Confirmed that the correct CSS file is used for the master pageRefreshed the page a couple times, even cleared the cache and used different browsers to make sure that it's not using an old cached version or somethingClean solution / Rebuild / Build, etc...Restart VSShout at it
This problem seems to pop up from time to time, I've never been able to figure out what causes it and it usually resolves itself... This time it seems persistent though, nothing fixes it.
What could cause this? I am hesitant to say there's errors in the CSS file for two reasons:
- I have ReSharper 6 installed which checks CSS files for errors, warnings, etc, it does not find any
- It works in the VS designer!!!
I suppose I could post the source but the CSS is quite large so that would be like searching a needle in a haystack. Also, because it works in the designer I feel there must be something else going on...
View 6 Replies
Jul 21, 2012
I have a .net aspx project done with VS 2008 using the .Net 2.xxxx framework. This ASPX application is deployed on and 4 different 2003 Server boxes. 3 are running in total beautifully. In the 4th box is my issue. I do a FILE.EXISTS conditional test looking for case file pdf's. These case numbers are structured as such 2012-C-0421,001,0008.PDF
Please note the comma's used in the path. 3 of the 4 servers in court houses recognize the path to the pdf WITH the commas in them perfectly and the FILE.EXISTS works 100%. On the fourth box (same config we THINK) the exact same FILE.EXISTS does not return a hit even though we see the document sitting in the folder via explorer. IF we remove the commas and make it 2012-C-0421001008.pdf all is fine and document is indeed discovered with the EXISTS.
WHY on this one server does the original ducument path not function. We can not ask the court houses to change the way they store their documents so I need to make this work like the other 3. Again... same version..same .net framework... same OS (2003 server)
View 4 Replies
Aug 3, 2010
I downloaded iTracker to get started doing some web development with ASP.NET. I don't understand why in the code behind file, the standard web controls are not recognized.
For example:
This is the ASPX File ...............
<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/ITracker.Master" CodeBehind="Details.aspx.vb" Inherits="dfs.ITracker.Details"
title="Untitled Page" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" runat="server">
<asp:label ID="lblPageHeader" runat="server" CssClass="PageHeader"></asp:label>...
View 6 Replies