Localization Works On Localhost But Not In Production Environment

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:

View 1 Replies

Similar Messages:

AJAX :: Not Working In Production Environment

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

Production Environment - Calling Stacks In .net?

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

VS 2010 - CSS Does Not Load In Production Environment

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

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);

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

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

ADO.NET :: Entity Framework - How To Update A Running Production Environment

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

Delay In Production Environment To Show Ajax Progress ?

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

Secure MVC Code When Deploy Applications To The Clients Production Environment

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

DataSource Controls :: Data Restore From Production To Testing Environment?

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

WCF / ASMX :: Differentiate Between A Debugging Session On The Localhost And A Live Environment In Terms Of Calls To The WS

Nov 8, 2010

I am trying to differentiate between a debugging session on the localhost and a live environment in terms of calls to the WS.

View 5 Replies

Web Forms :: Error In Production Environment When Dynamically Generating Script Code

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:


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:


View 2 Replies

Configuration :: Web Page Works With Localhost But Not With IP

Mar 26, 2011

I have a simple asp.net web page that lists and inserts records into an access db. It works fine by pressing F5 to run in the VS 2008 IDE (Localhost:port) but won't work when it is published. The log shows this error 500 0 0 207.

View 5 Replies

Web Forms :: Downloading File Works On Localhost But Not On IIS?

Apr 19, 2010

Here is the code I'm using:


Works great on localhost. But when I upload it to the server with IIS6.it works 25% of the time. the other times, I just get an empty (0 bytes) file to download.

View 1 Replies

URLRewritersends 404 When Uploaded To Server With IIS 7, But Works On Localhost?

Apr 28, 2010

I have "installed" URLRewriter.net to my website, and it works just fine when I run it from Visual Studio, but as soon as I upload it, I get a 404.[URL]Application Pool has been changed to "integrated", because my host suggested that could be it. It didn't work though.

View 1 Replies

Configuration :: Silverlight Works On Localhost But Not On LocalIP

Jun 9, 2010

I am using IIS5.1 and my silverlight application works perfectly when I access it by typing localhost on my browser but for some reason when I type in the IP address of the system all I see is the layout of the website but no data from the database is transferred to the datagrid. The silverlight application is simple and uses linq to sql to retrieve data from the database (through WCF service) and displays it using silverlight datagrid.

View 3 Replies

Configuration :: Routing Works In Localhost But Not In WebServ IIS 7

Oct 17, 2010

VS2010 - FW 4.0 - C#
My Global.asax

My web.config

Link for TEST: [URL] (Pls, click in button "Contato" -> [URL]

Error Summary
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

View 1 Replies

Downloading Works Fine On Localhost But Not For IPAddress

Jun 7, 2010

I had code on Download.aspx for downloading different type of file like doc, xls, pdf etc. I usually call the page to download a file. In one of my instance i am calling this from a java script code which works fine for [URL] but if I put ipaddress instead of localhost then its not working.

View 2 Replies

Website Works Correctly On Localhost But Fails Sometimes Online

Mar 3, 2011

I have the following problem, I make a web site when I run this website (locally) I get the correct data (for example I have a set of cities according to the city selection, I get the required data), but when I publish the web site and try it on line (I get incorrect data under the same conditions I tried before locally). I don't know what is the problem, I need to trace the code online (debug the code on line) to know where the problem. Is there any suggestions how to treat case like this, code works in correct manner locally but fails sometimes online? I use (https) online. I use static variable (supposed not to be changed) but online the value of this variable is changing and make this problem.

View 3 Replies

Http Handlers Not Working On Web Server But Works On Localhost?

Mar 16, 2010

i have a couple of xml files in my asp.net web application that i don't want anyone to access other than my server side code. this is what i tried..

<add verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" />

i wrote this inside the <httpHandlers>

it works well on the localhost but not in the server... the server without any hesitation displays the xml file... i have no idea how to proceed...

Update: the server has IIS6, windows server 2003

View 4 Replies

Configuration :: Application Works In Test But Not Production?

Oct 18, 2010

So my application worked great on my computer but as soon as I try and put it in production....I'm getting all sorts of issues.


This is the top of Default.aspx.vb.


View 10 Replies

.net - RequiredFieldValidator Works On Dev And Stage Environments, Not Production?

Aug 5, 2010

We deployed our legacy ASP.NET application to production after successful test deployments to our staging environment. The application makes use of RequiredFieldValidators on one particular registration page. On our development and stage environments, the validators successfully detect empty fields when "Submit" is clicked, error messages are displayed, and form submission is prevented. But on production, the validators do not display error messages. Clicking submit will cause a postback, the code-behind checks for Page.IsValid and correctly detects the form has missing fields, but the registration form is redisplayed with no error messages (ie "Please enter an email") to the user.Sample: (note I dont explicitly declare EnableClientScript or SetFocusOnError)

<asp:requiredfieldvalidator id=Requiredfieldvalidator1 runat="server" CssClass="NormalRed" Display="Dynamic" ErrorMessage="Please enter an email." ControlToValidate="txtEmail"></asp:requiredfieldvalidator>

Both environments (stage and production) are identical: Win2K3 Server and IIS 7, SQL Server 2008, and ASP.NET 1.1 runtime (embarrassingly).

View 3 Replies

Web Forms :: Email Attachment Only Works In Dev Environment Not On Hosted Server?

Feb 5, 2010

I have a form where a user asks for a quote and we need to send an attached application form. all this worked in the dev environment but when I post the changes onto our hosted server (third party ISP) I get an error when the attachment is added. I have tired to use URL's but that does not work, at the moment I am using a relative path, but have also tried to place the file in the forms page folder.

Here is my attachment code:

string strFullPath = System.Web.HttpContext.Current.Server.MapPath(pRelativePath);
Attachment myAttachment = new Attachment(strFullPath, System.Net.Mime.MediaTypeNames.Application.Pdf);

this is in a try - catch block and I get the error "Could not find file".

View 2 Replies

Configuration :: DLL Works On Local IIS But Fails On Production Server?

Jul 14, 2010

I have used a dll named MARCEngine, which is used to read Marc data. I use a method named MARC2MARC21XML which converts a normal marc file to an XML file.

The problem is it works great on my local IIS, but when I upload it to the production server, it only generates the root node and not the child nodes.

Here is a snippet of my sample page :


Asp.net has the permissions to access the files geneated.

View 1 Replies

Configuration :: Login Works On Local Machine But Not In Production?

Sep 1, 2010

Here is my problem: I have created a login form on my local machine. I have tested it on the local machine and it works fine. But when I push it to production it doesn't work.

I set-up the web config file so that the system uses the production database even from my local machine. I used the Web > AspNet Configuration tool in Visual Web developer to add a user to the production database. I used Sql studio management studio to confirm that the user was in the production database and not just on a local database. I have removed all references to the local database. I even deleted the entire app_data folder on my machine so that there was no chance that I am using a local database.

To create the login, I dragged a login component onto my Login.aspx page from the toolbar in visual web developer.

Why can I log in just fine on my local machine, but when push everything to production and I try to log in as that user I get the error message "Your login attempt was not successful"

View 3 Replies

Localization :: Global Resources Not Being Updated When Moved To Production Web Server

Jan 28, 2011

I have a masterPage that has several labels populated by a Global Resource file. For some reason every time I add a entry to the Spanish global resource file and precompile my website and move out the App-GlobalResources.compiled and App_GlobalResources.dll. The changes/Updates do not seem to be reflected on the Prod Web Server. Am I missing a file I need to move to the server? the update is working fine when I run the site locally.

View 1 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved