I am using MVC 2 Model Validation together withLocalization. For some strange reason, everything works fine except for one translation, namely the word "Password". It should change into "Wachtwoord", the Dutch term, but it doesn't. I checked everything and I can't find what's wrong.So, there's the AccountModels.cs file, containing the class RegisterModel (which is the basis for the view file and validation). It looks like this:
[Code]....
Obviously, there is also a Names.resx file which contains all the aforementioned "LocalizedDisplayName" elements:The Register.aspx file reads from this model:
[Code]....
The HTML output is like:As you can see, everything gets translated correctly, except for "Password".
To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.
As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.
I pasted in the code using the text only option becuase the format was getting messed up. I probably need more background on why the fields are blanking out.
I'm developing a internal web app for a foreign friend.
Since many of the users don't speak english very well, I wanted to add local translation to the web.
It's been a while since I've used .net, and perhaps I'm getting a little bit rusty, but my Localized resources are not working for some reason.
I have a Default.aspx.resx in my App_GlobalResources folder and inside it a small resx file. It simply has one test string: "Button" with the value of "Botón", nothing complex there.
Then I have the test controls: <asp:Localize runat="server" ID="test" Text="Button" meta:resourcekey="Button" /> and <asp:Label ID="header1" runat="server" Text="Button" meta:resourcekey="Button" />
But this isn't updated. Things that I've tried:
1. Put UICulture in the Page Tag
2. Renamed the resource file to Default.aspx.es.resx
3. Put my browser in 'es-ES' locale
4. Tried to load the resources explicitly inside <%%>
I have mulitlanguage platform in place - need to have the HEADER LOGO.PNG on my site to change with my language-button function.My startingpoint is this from my Masterpage :
I am trying to localize my wesbite from English to Spanish. The website is built in Spanish. I have done such work perfectly in a html website but i do not have experience with .net localization. I know only Resource files are need to be translated.
I have a simple WCF service that retrieves some data from the DB. When I host the service on local serviceHost everything works fine, but when I host the same service on local IIS (7.5 - windows 7) I get this exception: The Undelying provider failed on open.
I have some logging services inside the service and I found out that this exception occures only when the service calls some DB service (not one particular, any DB service). The strange thing is that when the service is not hosted on IIS this same DB call works fine.
Things I've done: enabled ASP.NET impersonation on the IIS server -> didn't help.
Another thing : I'm using sql server 2008 express.
The following message appears in our log:The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. alot has been written about this subject. However, I cannot reproduce this behavior, and I only find a couple thousand errors per day in the logs; so it's probably isn't that obvious.
The page in question has an UpdatePanel and loads one of three usercontrols depending on the querystring.Is there any known issue with some clients, or any other possible explanation?
We are using RDLC's in a Asp.net web application. For reasons beyond our understanding, the first call to the database server fails with the following error:
An error has occurred during report processing. Cannot open database "TryParkingIt2" requested by the login. The login failed. Login failed for user 'EXTRANETOurServerNameHere$'.
Run the report again, it works.
Update Click the button the first time, it fails. Click the button again, it works. The account being impersonated is a domain account. Also, this error occurs on all five different report pages, which is why I didn't include any code.
I have the following config for roles using standard SqlRoleProvider, but I get an error when I try and open the Security page in the wweb site Admin tool:
What does this mean and how can I correct it?Cannot open database "myDATABASE" requested by the login. The login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'. I'm using SQL Server 2008 EXPRESS and Visual Web Developer 2008
why this update is failing? The table is connected to OK and there are appropriate values in the parameters to the subroutine, and yet the record in the table remains unchanged. I am using exactly the same code (with different parameters, obviously) to update another table and this continues to work fine.
Public Shared Sub SaveMathsSettingOptions(ByVal ID As Integer, ByVal Auto As String, ByVal Repeats As Integer, ByVal Weekly As String, ByVal ClassSheets As Integer, ByVal HomeSheets As Integer) Dim con As New MySqlConnection(_connectionString) Dim ret As String Dim sql As String sql = "UPDATE centres SET maths_auto = @maths_auto, maths_auto_reps = @maths_auto_reps, maths_weekly = @maths_weekly, maths_class_sheets = @maths_class_sheets, maths_home_sheets = @maths_home_sheets WHERE centreID = @centreID" Dim cmd As New MySqlCommand(sql, con) cmd.Parameters.AddWithValue("@maths_auto", Auto) cmd.Parameters.AddWithValue("@maths_auto_reps", Repeats) cmd.Parameters.AddWithValue("@maths_weekly", Weekly) cmd.Parameters.AddWithValue("@maths_class_sheets", ClassSheets) cmd.Parameters.AddWithValue("@maths_home_sheets", HomeSheets) cmd.Parameters.AddWithValue("@centreID", ID) Try con.Open() Catch myerror As MySqlException 'MessageBox.Show("Error Connecting to Database: " & myerror.Message) ret = myerror.Message con.Close() Finally con.Dispose() End Try End Sub
Language-Asp.net(c#) 2008 Sql Server 2005 well i designed a simple login form which checks the user and password with sql server but now i want to make it a little bit more secured basically i want if a user attempts wrong password with more then 3 /5 times. his id or username should be locked(which i will be running a update procedure) or he must be redirect to denied.htm and one more thing he should be able to get only n only 3/5 attempts whether he opens firefox browser,internet explorer ,safari,google chrome or any other browser
I put a breakpoint on a Page_Load method for a .aspx page and I'm getting the following error when trying to run in debug mode:Quote:The breakpoint will not currently be hit. No symbols have been loaded for this document.I checked the "Modules" window and the DLL for this project is not listed there, but it does list all the DLLs for the other projects in the solution. I also checked web.config and verified that debug="true".
I have a series of parameters stored in rows in the database, and I'd like to return rows that satisfy both input parameters. The parameters come through in the URL, like "&msg_type=20560&status=101"
I have code that works fine, but only if there's one parameter. If there are two, it empties out the results. Here's my code:
What is the best way to debug a CompareValidator that always fails the validation? Is there any way to see what the values are that it's comparing to maybe get a clue as to what's going wrong?
I am attempting to register my user controls within the webconfig file because I am receiving the Element does not exist error, but I am receiving the following error when I try to register them in webconfig:
Invalid or missing attributes found in the tagPrefix entry. For user control, you must also specify 'tagName' and 'src'. For custom control, you must also specify 'namespace', and optionally 'assembly'
The following is the code within the webconfig file:
I've got my e-mail health monitoring working fine (removed here) but when I try to get it into SQL Server it fails. When I run the stored procedure (aspnet_WebEvent_LogEvent) manualy it works OK. But nothing happens when I create an error (but I go get my health monitoring e-mail). What can I have missed?
I have created a C# registration page that includes a secret question and answer. The secret questions are in a dropdown list. When the form is submitted, all field information gets written to my mssql database successfully but the value selected in the dropdown ListItem gets NULL inserted instead of the question.
i tried to use external assembly in my web service method (Web service is worked in LAN). This external assembly in their own internals use TcpClient to access to external IP address. But unfortunally. Creation of TcpClient fails.
System.Net.Sockets.SocketException was caught Message=A socket operation has encountered a dead network xxx.xxx.xxx.xxx:xxxx Source=System ErrorCode=10050 [code]...
The app is written in c# but i havn't posted any actual code as all the user code related to this markup seems to work fine.
The problem is the CheckBox chkTVLic has causes validation set to false and autopostback set to true. So whatever happens when i check and uncheck the checkbox it should postback. Most of the time this is exactly what it does and the result is to show and hide pnlTVLic when it is checked and unchecked. However if any on the validators within the panel fire, the checkbox does not cause a postback the first time. It will on all subsequent times but never the first. However it should ALWAYS cause a postback. What could be stopping it. Before someone asks there is no use written client side code, everything is pure .net markup and c# code.
We have a system in production, part of which is now failing. The failing part worked as follows:A user would upload a document, the type could be word, excel (1997 - 2007 format) or pdf. Then they would create an email in our application. The email would have a link to an aspx page which when visited, would parse the query string to find the readers information in the database, update a record to indicate that they clicked the link to read the document, then do a response.redirect to the document.
I have a requirement to allow access to an app with users being authenticated by AD. Sadly, not all of the users who can access the app will have been authenticated this way so I need to provide a mechanism whereby if a user arrives as the site their authentication is checked using AD and if it fails, they are handed off to a login page that will attempt to authenticate them using the SqlMembershipProvider.
So, to my questions: how do I go about configuring it? If I want to use profiles, can both membership providers share one set of profile tables (stored in SQL)?