C# - Getting CS1502 Compiler Error On Dev Environment But Not Production?
Apr 29, 2010
When I try to run my ASP.NET app from my development environment I get the following error message: Compiler Error Message: CS1502: The best overloaded method match for 'mmars.Printing.printFunctions.SetPrintSummaryProperties(mmars.contextInfo, ref mmars.Printing.printObjSummary)' has some invalid arguments.
When I publish and run on our production server I don't get this error.It seems to compile fine when I build from the build menu (in fact if I change the second argument of the bolded function call below, i get a compiler error in visual studio), but now i've suddenly started getting this error message at runtime. So another question I have in addition to getting rid of the error is why is the .NET development server even trying to do JIT compilation on my project if it is already compiled into a DLL?
Printing.printObjSummary myPrintObj = new Printing.printObjSummary();
Printing.printFunctions.SetPrintSummaryProperties(ci, ref myPrintObj);
printObjects.Add(myPrintObj);
Also, though there are no warnings at compile-time, when I get redirected to the page with that first compilation error there are many warnings like the following:
Warning: CS0436: The type 'mmars.MMARSSummaryDataItem' in 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot3dad423c40569048App_Code.b0rgpkzr.4.cs' conflicts with the imported type 'mmars.MMARSSummaryDataItem' in 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot3dad423c40569048assemblydl37179c19a345f948c_ece7ca01mmars.DLL'. Using the type defined in 'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot3dad423c40569048App_Code.b0rgpkzr.4.cs'.
What's the deal with that? Is the webserver complaining about name conflicts in the source file and dll resulting from the source file?
View 2 Replies
Similar Messages:
May 6, 2010
I am dynamically generating script code to return transaction data to Google Analytics using their ecommerce script. The code that generates the script is fully tested and functional on my development machine and when I view the page code the script, along with any values that were passed to it, can be seen above the </form> tag. Happy days, or so I thought. For some reason the code is not being generated when I test it in a live, hosted environment. I cant figure out why this is the case as the code is quite simple. I simply generate the script code and register it on the client side (see code below)
//Capture the transaction data for analytics ecommerce tracking
//Generate the necessary script code
string strAnalyticsEcommerceScript = Analytics_Ecommerce_Script_Creator();
//Register the script on the page
Page.ClientScript.RegisterStartupScript(this.GetType(), "AnalyticsScript", strAnalyticsEcommerceScript);
The page in question is called "Order-Successfull" and is where customers are sent to when they have succesfully payed for an order. On this page:
-The order is added to the orders database table
- The customer is emailed an order confirmation email
- The google analytics script is generated and registered
The Sequence is as follows:
[Code]....
Whats really interesting is that if I move the Analytics script creator code before the code that sends the emails, the script is generated and can be seen when I view the page code. If I do this, however, the emails do not get sent. If I lay the code out as per the code I have inserted in this post, the emails get sent but the script code is not placed on the page.. The code to that actually sends the emails is quite standard:
[Code]....
View 2 Replies
Mar 1, 2011
I am using windows 7, my application is working fine in visual studio but when i host it and browse it through my browser getting the following error. Sometime back it worked fine but recently it started giving this error. Server Error in '/InfraICHR' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC2000: compiler initialization
[Code]...
View 1 Replies
Nov 29, 2010
I developed a web page using asp.net 2.0 and ajax toolkit on my laptop on Windows 7 and IIS 6. I have my ajax/atlas toolkit DLL in my bin. The updatePanel works fine and does not postback my page. But when i hosted my website on a dedicated server the page postback totally like i have no updatepanel/ajax in my page...
I am using : Windows server 2008, IIS 6Ajax 2.0 installed on the server. I don t understand what is the difference with windows server or IIS or something else?
View 5 Replies
Jun 11, 2010
I have a procedure in asp.net web site that gives strange result sometimes, I'm thinking to add some code to track it. My question is, in the production environment, is there any way that I can get the calling stacks like the one in the exceptions?
View 1 Replies
Apr 9, 2012
In my development environment, my CSS loads perfectly. But when I publish the files to the server, the CSS no longer loads.
Originally, when I had this problem, it was because I was denying access to unknown users for all directories. It was also occurring in both environments.
When I fixed that, the CSS started working just fine. But when I publish it to the server, it no longer works.
The website appears to function. I can log in, navigate pages and everything. It's just that the CSS doesn't work.
I checked the permission on the directory and it has access to NETWORK SERVICE, the admin account and IIS_IUSRS.
View 5 Replies
Jan 20, 2011
I have this website with english and portuguese support. In localhost everything works fine and the content is translated based on the querystring parameter named "lang". This chunk of code makes the trick in every page:
protected override void InitializeCulture() {
SetCulture(); } private void SetCulture() {
var logger = Util.GetLogger();
string lang = Request.QueryString["lang"];
if (string.IsNullOrEmpty(lang)) { lang = "pt-br"; }
string sessionLang = (string)Session["lang"];
if (sessionLang != lang) { Session["lang"] = lang;
} logger.Log(string.Format("Culture {0} found",lang));
UICulture = lang; Culture = lang;
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(lang);
logger.Log(string.Format("Cultura {0} set", lang));
base.InitializeCulture(); }
Thanks to the logger I can say for sure that this method is called in both cases (production and localhost). I have two resources files in App_GlobalResources folder:
-WebSitemapGlobal.en-us.resx;
-WebSitemapGlobal.resx;
View 1 Replies
Feb 21, 2011
I have read some articles about the new enitity framework and I think it looks very cool from a development perspective.
considering a production environment loaded with data. How does one apply changes to the model? You cannot regenerate the model and in most large organizations, database changes are executed by DBS's and not developers. In such situaitons, it is the role of the developer to develop delta-scripts that the dba can execute.
My experiense with Hibernate (Java) and the like is that you have to pay double when using such frameworks.
View 2 Replies
Oct 1, 2010
Is it OK to use threading.sleep in an intranet web application to display AJAX loading (in production environment)? Off course, the application works fine without it but all works too quick for the end user or even a developer to notice any difference.What is the recommended approach ?
View 1 Replies
Jul 3, 2010
I am developing 2 Applications. One WebForms and the other is MVC. How can i secure the code such that when i deploy them to the clients production environment, they cannot be simply picked up, copied and repackaged by someone else?. I simply need a way to protect my intellectual property. Can this be done in Visual Studio 2010?
View 1 Replies
Mar 3, 2010
Current process:
Whenever we have an issue in production, we restore DB backup from our nightly sql backup files in our testing environment. This way we get all data from production.
New Requirement:
Instead of restoring the db which takes upto 2 days, they want to do only selective restore based on few parameters. Requirement is to a build a new ASP.NET page in our application with few inputs. On submit button click, I should select data from prod and insert into testing environment. This involves opening new sql connection.
View 2 Replies
Jun 15, 2010
I have searched and could not find any article related to "How to implement Certificate Security in
production environment".
I could able to Create sample certificates for client and Server on my local machine and was able to authenticate my client app with the certificates . These certificates are test certificates.
How do I do this in Production. We have a domain certificate from GoDaddy which resides on the server. How do I create a Client Certificate off of that.
View 2 Replies
Apr 22, 2010
<%# Eval("NAME").ToString() == "Edit" ? %>
<asp:ImageButton ID="imgEdit" runat="server" ImageUrl="../icons/icoedit.png" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>' />
Error: Compiler Error Message: CS1525: Invalid expression term ',
View 2 Replies
Aug 13, 2010
[Code]....
When i debug this, i gt this error.
View 1 Replies
Jan 8, 2010
I have the following class... Compiler Error CS1061 / how to avoid it
[code]....
View 2 Replies
Dec 10, 2010
I have a web application written using VS201, ASP pages, .NET 4.0, C# and now that I am getting ready to publish to the clients server I have noticed the following error...
[Code]....
Line 26 is the error I do not understand what or why? At the top of several pages where I use the same code segment several times I declare a new instance of the errorlog class. Now all of a sudden it is reporting it as a Compiler Warning Message it as an error for every instance where I am declaring it.
View 4 Replies
Sep 3, 2010
meaning of this error?
Compiler Error Message: CS0308: The non-generic method 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string, string, string, string, string, System.Web.Routing.RouteValueDictionary,
[Code]...
View 3 Replies
Oct 30, 2010
So one of my views refuses to display, instead throwing up an error about an unreferenced assembly in a generated code file.Here's the controller action: [Code]....
And here's the view. [Code]....
And this is the error: CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
The error occurs in %appdata%LocalTempTemporary ASP.NET Files
oot7045d95d878a2a8App_Web_create.aspx.fd7fb922.zxi-cdky.0.cs, which is clearly not a file I wrote or can edit. System.Data.Entity is referenced in both my view project and domain model project.
View 5 Replies
Jan 4, 2010
I am a recent convert to ASP and a fairly total n00b, which means that though I've worked with web technologies for all my life, I have no idea how ASP handles them and I'm learning step by step so I beg for some patience as my many questions may be trivial.
For example, I've followed a couple of online tutorials on creating basic authentication via web.config, however I have run into some trouble. Here is my setup:
[Code]....
and some HTML:
[Code]....
However, after compiling, the browser tells me this:
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS1061: Type `ASP.views_login_index_aspx' does not contain a definition for `ProcessLogin' and no extension method `ProcessLogin' of type `ASP.views_login_index_aspx'
could be found (are you missing a using directive or an assembly reference?)
View 4 Replies
Mar 10, 2010
Using VS2008 SP1, .NET 3.5 SP1, C# Web Application Project
As we know, Web Application Projects (unlike Web Site Projects) compile the entire site for deployment. We have discovered a situation where the visual studio compiler doesnt catch and error. Then when we deploy the dll to the website (or even just run it in the built in web server) it catches the error and displays it as a "compilation" error during runtime. This is obviously disturbing. Let me explain the error:
Take a single web page in a new C# web app project, such as the default.aspx. Add a checkbox. Create an event handler for the checked changed event. Note that it modifies the .aspx file to add oncheckedchanged="yourmethodhere" in the checkbox item. Compile and everything is fine.
Now change the name of the method in the .aspx file, say for yourmethodhere to yourmethodhere_1 and compile again. Note you havent change the code behind, so you SHOULD get a compile error. But you dont. Now if you deploy or debug it, you will get a compilation error during runtime.
Note: If you do exactly the same thing in a web SITE project, the validation compile that it does when you choose to "build" the project DOES catch this error. In other words, only c# web APPLICATION projects have this problem.
View 3 Replies
Oct 25, 2010
I keep getting this error randomly while testing an website that Im building. Can anyone give me insight into what is causing it.
[Code]....
View 1 Replies
Jan 14, 2010
Compilation Error Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CVT1106: cannot write to file
View 2 Replies
Jan 31, 2010
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30451: Name 'SendMail' is not declared.
View 3 Replies
Apr 20, 2010
I have a ASP.NET (C#) web page in which I want to enumerate a dictionary in a code render block:
<% foreach (Dictionary<string, string> record in parsedData) { %>
<div>...Some HTML Code...</div>
<% } %>
But I get an error like:
Compiler Error Message: CS0246: The type or namespace name 'Dictionary' could not be found (are you missing a using directive or an assembly reference?)
How do I import System.Collections.Generic into the page itself? Here is my page directive:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyCSharpClass.aspx.cs" Inherits="_MyCSharpClass" %>
View 3 Replies
Jun 22, 2010
I've just gone thru a large-ish project and renamed A LOT of namespace directives. Everything works fine on my developer box - deploy it to stage and I get:
Compiler Error Message: CS0433: The type 'ASP.usercontrols_pageheader_ascx' exists in both
'c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot89252a5f7305b927App_Web_hodsbmv3.dll' and '
c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot89252a5f7305b927App_Web_pageheader.ascx.6bb32623.bs4iljip.dll'
Yuck. Very similar to this: Deployment Project dlls cause 'type x exists in both' errors, but must be coming from a different cause.
I have none of the problems I've seen mentioned in other articles (App_Code / CodeFile directive). Worked out why it works on my machine: the website has no problem when it is in a vdir. If I remove the "PageHeader" usercontrol from the masterpage it lives on everthing is fine. If I rename "PageHeader" everything is fine. Updated: renaming the usercontrol doesn't help.
I'd had a look at the assemblies mentioned in the error in reflector; App_Web_hodsbmv3.dll contains dynamic classes for all the usercontrols in my project. App_Web_pageheader.ascx.6bb32623.bs4iljip.dll' contains the same code just for the PageHeader usercontrol. Why would ASPX decide to create the same class in two assemblies?
View 2 Replies