.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
Similar Messages:
Apr 15, 2010
I have seen the examples on how to switch between connections strings for development and production enviroments. My web.config also calls out a connection string for <roleManager and membership><providers>. Can this be setup to switch between the two connection strings?
View 1 Replies
Mar 23, 2010
In my project i'm using the concept of impersonation to implement "File Upload functionality".i.e.
to save the file uploaded to a network share.This n/w share is accessible to an application id only.So i'm impersonating with that user id when uploading a file. I'm importing "advapi32.dll" and using the LOGONUSERA method of that dll to validate the user and get the token for that userid and then impersonate using the Token returned. THis approach is working fine in the development environment but LOGONUSERA always fails in TEST and PRODUCTION environments. It always return "0" which means user id is invalid and the token is zero hence i cannot impersonate. Is it something related to accessing the dll in other environments? Any suggestions to resolve this issue will be a great helpp for us. We are hung with this issue for the past 5 days.
View 1 Replies
Feb 14, 2011
I placed 2 requiredfieldvalidators in my page (well, actually, more like a dozen of them, but only these 2 behave this way) and can not seem to figure out why the error message will not be displayed. The validation function works (the processing code is not run and focus is returned to the first field that fails validation) but no error message.
[Code]....
View 23 Replies
Mar 12, 2010
I'm making a website in ASP.NET 4.0 where I make use of the RequiredFieldValidator control to validate a wizardstep.It works perfectly with Javascript enabled, but when I turn it off (in my Firefox) it just goes to the next step.We don't do a Page.IsValid check, but we don't do much on the "next button clicked" event either.Certainly not something that is forcing it to go to the next step.
View 15 Replies
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.
[Code]....
This is the top of Default.aspx.vb.
[Code]....
View 10 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
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 :
[Code]....
Asp.net has the permissions to access the files geneated.
View 1 Replies
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
Apr 12, 2010
I have a hosted site and just added some additional error notification to my global.asax file and works like a charm. I decided to add the same logic to our test server and it doesnt work. The server.transfer never happens and the email never gets updated. Now i know the email works on the test and production server since we have other pages that use the same SMTP server name and setup as i have in the global file. Below is my code as it is in the file now. I setup a test page to cause an error and the page displays the detailed error which we dont want. But i would like to be notified if this happens. What am i missing? I can only assume that its a IIS confige issue, since the exact same code works on a hosted site, but not at work on our test or production servers. Here is the code i have in the global.asax
[Code]....
View 18 Replies
Feb 7, 2010
I've never had this problem before, I'm at a total loss.
I have a SQL Server 2008 database with ASP.NET Forms Authentication, profiles and roles created and is functional on the development workstation. I can login using the created users without problem.
I back up the database on the development computer and restore it on the production server. I xcopy the DLLs and ASP.NET files to the server. I make the necessary changes in the web.config, changing the SQL connection strings to point to the production server database and upload it.
I've made sure to generate a machine key and it is the same on both the development web.config and the production web.config.
And yet, when I try to login on the production server, the same user that I'm able to login successfully with on the development computer, fails on the production server.
There is other content in the database, the schema generated by FluentNHibernate. This content is able to be queried successfully on both development and production servers.
View 2 Replies
Feb 8, 2011
How to get postback data in page preinit stage? Can I do that?
View 2 Replies
Jun 22, 2010
Let's say I have a booking form which is divided into 3 separate views in a multi view.
View 1: "How many people do you want to book for?" And then just a text box
View 2: "Please enter the details for each of the people" And then a series of dynamically generated text boxes - the number of boxes is determined by the value in the textbox in view 1 (e.g. if the users enters "3" into the text box, there will be 3 series of text boxes like "Details of person 1: First Name <textbox> Last Name <textbox>, Details of person 2: First Name<textbox etc..."
View 3: "Please review and confirm the details are correct:" Displays data entered in view 2.
Here's the difficult part - In order to generate the controls in view 2, I need to know the value of the text box in view 1. This value isn't available during Page_Init as viewstate has not yet been written. But - need to build the controls during Page_Innit. So - I thought why not try to grab the value of the textbox using Request.Form[Texbox1.ClientID]; - this is fine when moving from view1 to view2 but remember - I need to recreate these controls again if the user moves back to view1 or forward to view3 (it is a requirement that the user can move backwards and forwards between the views).
So - User enters value in Textbox in View1, hits the "Next button", we request that value using Request.Form and generate a series of controls dynamically. Then the user clicks "Next" again and moves to view 3 where we would like to show a summary of what they entered. But - we cant because those controls dont exist as we could not create them because the value of textbox1 is not available during Page_Init and we can't use Request.Form as the textbox isn't now part of request.form because we came from view2, not view1.
I can't figure out how to dynamically create these controls and then recreate them during page_innit on each postback so we retain any values the user might have entered.
View 1 Replies
Dec 18, 2010
I have created an ASP.NET website which accesses a DB. The DB can will be alrady installed at target machine. It can be anything from SQL server 2000 to SQL server 2008. Further more the target OS can be anything from Windows server 2000 to Windows 7. I have kept the target .Net framework version as .Net 2.0 to keep matters simple. Also, the target machine can be x86 or x64 or Itanium. Do I need to create separate builds for different target platforms? How do I create an Installer which will : Put this website on a Virtual Directory of IIS server(can be any IIS version) Detect the target platform and install the appropriate build. I need to do this either using the standard MSI installer of VS2008 or using WiX or any open source installer for that matter.
View 1 Replies
Jan 28, 2010
what MVC stands for,but if I'm already developing .NET websites without it,is there any reason I would need/want to use it?is it designed for people who already have experience with developing in an MVC environment and wanted a ".net"version of it?Is there some "head-to-head" comparison of MVC against other programming environments or techniques that have been written? It seems like what I might gain in development speed I might lose in flexibility.maybe I just don't understand what all the fuss is about.hence this post!
View 6 Replies
Mar 22, 2010
For developing a VS-2008 application at developing stage best softwares for test the application.we found some of the testing applications like NUnit and MSUnit, which are the softwares best to test the application at developing stage.
View 2 Replies
Jul 9, 2010
This question is for ASP.NET and SQL Server developers. What are your best practices with respect to setting up your development and test environment? I'm interesting in the following issues:
1. How many tiers do you recommend and what goes on on each tier? Just dev, test, and production or perhaps dev, test, staging, and production?
2. Which types of applications and/or servers should run on actual physical hardware and which can get away with a VM?
3. What are your strategies for loosely coupling users from web sites, web developers from their web/app/DB servers, and DB developers from their DB servers?
4. How do developers stay "DRY?"
5. What are the pros and cons to putting web, app, and DB servers on their own machines? Does putting servers on separate machines in order to minimize contention for a machine's resources trump any NIC and network latencies that might be introduced by putting them on different machines?
6. How do you configure your web apps to minimize contention for resources (e.g. virtual directories, separate application pools, etc.)
7. How and how often do you refresh your databases on each tier? Do you just refresh the data or both the data and objects?
View 1 Replies
Sep 14, 2010
I have a custom control with a UpdatePanel inside. Depending of user action or page programing I call Update method of my UpdatePanel to refresh html portion to user.
For example, I created a property called Title. If the Title change i call Update of my UpdatePanel.
[Code]....
But if the Title property is configured on aspx file, my UpdatePanel is always refreshed because my Title property is setted on Init stage of page life cycle.
I need to know if this property is setted on init stage or if ViewState is restored to avoid call Update, or any tips to avoid refresh my control everytime.
View 1 Replies
Aug 4, 2010
What is the best way to store/access connection strings and most importantly the URLs for different environments (dev, validation, production). I'm using ASP.NET 1.1.
View 2 Replies
Jul 10, 2010
I have converted the change password control to a template. It is inside an update panel. After changing the password the confirm button takes the user to the success step by updating the update panel. Then by clicking the OK button, I would like to reset the password changer to its initial state so that the user can change the password again. Right now I am not sure how this is done and the control simply remains at the second step, telling the user "password has been changed" . User can press OK. What must I write in the OK button click event to reset the password control to its original state?
View 3 Replies
Feb 24, 2010
I'm currently in the process of creating a library app to use inconjunction with websites. Note: NOT JUST ASP.NET SITES. I say this because i've made the dll available to COM and it works, I can reference it from VB6 and see the types/functions/enums etc...My question though is this: I like using List<type> in c# and I know if this dll was only to be used with .net sites then there would be no issue but how would a List<type> be returned to a different environment. Can they recognize this?
View 2 Replies
Mar 27, 2010
I am developing a custom control that needs it's viewstate to be loaded on init. Can I antecipate the view state loading at any time?
View 1 Replies
Jul 19, 2010
I have a RequiredFieldValidator for a text box on my form. this form has three buttons. I want only one of these buttons to run the RequiredFieldValidator, not the other two. How do I do that?
View 7 Replies
May 26, 2010
I have a webform which has validators on it that work well when the user presses the submit button. But when the user presses the logout button the validators stop that button from working.
View 3 Replies
Feb 24, 2010
I use 2 requiredfiledvalidator for 2 selects, one is working but the second one (the one I need) isnt
<asp:dropdownlist id="ddlMod" runat="server" Width="235px" AutoPostBack="True" Font-Names="Arial" Font-Size="XX-Small">
</asp:dropdownlist>
<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" Font-Names="Arial" Font-Size="XX-Small"
ErrorMessage="Select Mod" InitialValue="00" Display="Dynamic" ControlToValidate="ddlMod">
</asp:requiredfieldvalidator>
<asp:dropdownlist id="ddlInd" runat="server" Width="235px" AutoPostBack="True" Font-Size="XX-Small">
</asp:dropdownlist>
<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" Font-Names="Arial" Font-Size="XX-Small"
ErrorMessage="Select Ind" InitialValue="0" Display="Dynamic" ControlToValidate="ddlInd">
</asp:requiredfieldvalidator>
If i select the 2nd one I can see the error message for the 1st one, but I can't see any message if I dont select any or if I select the 1st one.
View 2 Replies