CustomValidator dependent on multiple controls
This article describes how to validate 2 or more controls to see if at least 1 of them has content.
Well.. here it is... my BLOG! Started out being mostly used for dropping bookmarks - links to good sites relating to my current interests. Now even with some code samples and comments about interesting pages.
2007-07-27
2007-05-09
The underlying connection was closed: Unable to connect to the remote server.
This error sometimes occurs when consuming webservices through a proxy.
This error sometimes occurs when consuming webservices through a proxy.
2007-05-04
Load Balancing / EPiServer
Just putting in a few links so I won't loose them:
How to configure a Windows Server 2003 Load Balancing cluster:
Web Farming with the Network Load Balancing Service in Windows Server 2003
EPiServer:
Configuring the Cache in Multi-Server Scenarios
Configuring EPiServer Enterprise Edition
Just putting in a few links so I won't loose them:
How to configure a Windows Server 2003 Load Balancing cluster:
Web Farming with the Network Load Balancing Service in Windows Server 2003
EPiServer:
Configuring the Cache in Multi-Server Scenarios
Configuring EPiServer Enterprise Edition
2007-04-12
Script error on ASP.NET 1.1 pages
I got an error message on my aspx web page after one of the latest Windows updates:
Unable to find script library '/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing this file manually, or reinstall by running 'aspnet_regiis -c'.
After trying to reinstall the script library, and reinstalling aspnet on my web application, I found a solution by simply adding the following code to my aspx file:
<script language="javascript" type="text/javascript" src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
Update:
After I put in the script-tag above in my "master page", I got an other error on pages not having any validation controls, so I had to put in a hidden dummy validator.
I got an error message on my aspx web page after one of the latest Windows updates:
Unable to find script library '/aspnet_client/system_web/1_1_4322/WebUIValidation.js'. Try placing this file manually, or reinstall by running 'aspnet_regiis -c'.
After trying to reinstall the script library, and reinstalling aspnet on my web application, I found a solution by simply adding the following code to my aspx file:
<script language="javascript" type="text/javascript" src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
Update:
After I put in the script-tag above in my "master page", I got an other error on pages not having any validation controls, so I had to put in a hidden dummy validator.
2006-12-04
Changing Locale of the ASPNET account
I have a server that has been installed using default language/locale "en-US".
This becomes a problem with the date format, which is "MM/dd/yyyy" in en-US, while in Norway where I live we use (nb-NO) "dd.MM.yyyy".
There is also a problem with which character to use as a decimal point and which to use as a thousand marker/separator:
Norwegian (nb-NO): decimal point is comma (",") , thousand marker is space. Ex: 2 345,67
US English (en-US): decimal point is dot ("."), thousand marker is comma. Ex: 2,345.67
So I need a way to set the locale that the ASPNET account is using.
There are several ways. You can set this in the web.config file:
You can also set it in the users session, by using the Session_Start event handler:
If you want to change the default settings of the ASPNET account (and you have the guts), you could go in and change the settings in the registry.
NB! It may be risky to change settings in the registry. The author of this blog is not responsible for any damage that may be caused by doing so.
Anyway here it is, change the settings under the following key:
HKEY_USERS\S-1-5-20\Control Panel\International
Here you can see settings for number formats, date formats languages etc for the user. I have as of now NOT TESTED THIS, but the key for the ASPNET user should according to a news group be S-1-5-20.
Good luck!
I have a server that has been installed using default language/locale "en-US".
This becomes a problem with the date format, which is "MM/dd/yyyy" in en-US, while in Norway where I live we use (nb-NO) "dd.MM.yyyy".
There is also a problem with which character to use as a decimal point and which to use as a thousand marker/separator:
Norwegian (nb-NO): decimal point is comma (",") , thousand marker is space. Ex: 2 345,67
US English (en-US): decimal point is dot ("."), thousand marker is comma. Ex: 2,345.67
So I need a way to set the locale that the ASPNET account is using.
There are several ways. You can set this in the web.config file:
<system.web>
<globalization
culture="nb-NO"
uiCulture="nb-NO" />
</system.web>
You can also set it in the users session, by using the Session_Start event handler:
protected void Session_Start(object sender, EventArgs e)
{
this.Session.LCID = 1044;
}
If you want to change the default settings of the ASPNET account (and you have the guts), you could go in and change the settings in the registry.
NB! It may be risky to change settings in the registry. The author of this blog is not responsible for any damage that may be caused by doing so.
Anyway here it is, change the settings under the following key:
HKEY_USERS\S-1-5-20\Control Panel\International
Here you can see settings for number formats, date formats languages etc for the user. I have as of now NOT TESTED THIS, but the key for the ASPNET user should according to a news group be S-1-5-20.
Good luck!
2006-09-27
ADODB serialization
Found a simple but cool way to serialize an ADODB Recordset without converting to DataSet on CodeProject.
Found a simple but cool way to serialize an ADODB Recordset without converting to DataSet on CodeProject.
2006-08-14
Security Developer Center: Security Tips: Defend Your Code with Top Ten Security Tips Every Developer Must Know
Not sure if I have bookmarked this before. Well, better safe than sorry...
Not sure if I have bookmarked this before. Well, better safe than sorry...
2006-06-22
Build your own cryptographically safe server/client protocol - The Code Project - Internet & Network
Good article that explains quite a bit about how cryptography works.
Good article that explains quite a bit about how cryptography works.
2006-06-15
Some Cool Tips for .NET - The Code Project - C# Controls
Nice to know info on how to get information about windows and other stuff.
Nice to know info on how to get information about windows and other stuff.
2006-05-30
SQL Server Monitoring in 8 Steps: Lessons From the Field
How to get a quick status of the server while on-site.
How to get a quick status of the server while on-site.
2006-05-23
The Soul of a Virtual Machine : Sysprepping a virtual machine
Description of how to sysprep a VPC. Useful stuff.
Description of how to sysprep a VPC. Useful stuff.
2006-04-04
HttpSecureCookie, A Way to Encrypt Cookies with ASP.NET 2.0 - The Code Project - ASP.NET
This article describes how to encrypt cookies in .NET 2.0.
This article describes how to encrypt cookies in .NET 2.0.
2006-04-03
The 46 Best-ever Freeware Utilities
This is a nice page with lots of free software links. Among others, web browsers and antivirus programs.
This is a nice page with lots of free software links. Among others, web browsers and antivirus programs.
An introduction to Web Service Security using WSE - Part I - The Code Project - C++ Web Services
Some big players as Microsoft and IBM built a group that dealed with the security problem (of Web Services), finally offering several specifications. The most important, and foundation of the others, is Web Service-Security (WS-Security or WSS).
Some big players as Microsoft and IBM built a group that dealed with the security problem (of Web Services), finally offering several specifications. The most important, and foundation of the others, is Web Service-Security (WS-Security or WSS).
2006-03-29
SSH : Support : Cryptography A-Z
Site with a lot of information on cryptography, and different algorithms.
Site with a lot of information on cryptography, and different algorithms.
Visual Studio 2005: Visual Studio 2005 Code Snippets
This is very cool! Nice and free collection of code snippets from Microsoft, ready for pasting into your application source.
This is very cool! Nice and free collection of code snippets from Microsoft, ready for pasting into your application source.
2006-03-28
Server-Side Asynchronous Methods for ASP.NET and WinFX - The Code Project - C# WebServices
This article describes how to make asychronous calls to a web service. This is useful when the web service has to perform some task that takes a while to complete before returning the result to the client. By making an asynchronous call, the thread of the calling process can go back into the pool and be useful for other purposes while waiting for the response.
This article describes how to make asychronous calls to a web service. This is useful when the web service has to perform some task that takes a while to complete before returning the result to the client. By making an asynchronous call, the thread of the calling process can go back into the pool and be useful for other purposes while waiting for the response.
Subscribe to:
Posts (Atom)