Things I Want To Remember
My journal, notes, web log of all things I want to remember.
Wednesday, November 13, 2013
Visual SourceSafe VSS 6 - Reset Lost Admin Password
I have used this techinique a number of times. Use your fav hex editor... i prefer ultraedit and open up the um.dat in /data dir. Reset the bytes from offset 80
0:80 55 55 bc 7f 41 64 6d 69 6e 00 00 00 00 00 00 00
0:90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0:a0 00 00 00 00 90 6e 00 00 a8 01 00 00 00 00 00 00
This information is at YOUR OWN RISK
Save the file and close the editor. Open sourcesafe admin and open the database. VSS admin will behave as if the admin password was never set.
Originally from: http://hdave.blogspot.com.au/2005/03/visual-sourcesafe-vss-6-reset-lost.html
Sunday, March 18, 2012
Remote Desktop Full Screen in Windows 7
I have been having problems doing a full-screen mode in Remote Desktop Connection in Windows 7 for a while now and it is pretty annoying. This happens every time I minimize the RDC Window. I tried to google solutions to this and Microsoft suggested some fixes which you need to download and install. Luckily I came across this solution.
Apparently, you only need to press CTRL+ALT+BREAK on your keyboard to force the Remote Desktop screen into full screen. I can't believe Microsoft didn't put this into once of their resolution options on their website. And if your keyboard doesn't have a BREAK key in it, there is another option.
References:
Thursday, March 8, 2012
Solution to: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode error
I'm starting to blog every error that I encounter (with the solution of course), in the hope that they will become useful to other developers like me.
Today as I was deploying SQL Server Reporting Services 2005 in an IIS 7.5 environment, I encountered the following errors:
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
The solution to this is to change the Managed Pipeline mode of the Application Pool the SSRS sites are running and change it from Integrated to Classic.
In details, the following are the steps I did to do this:
- Open IIS Manager
- Browse for the SSRS Sites (usually located at Default Website\Reports and Default Website\ReportServer)
- View site settings and find out in which application pool are they using
- Click the Application Pool section in IIS and open the properties of the Application Pool the SSRS sites use
- Set the Manage pipeline mode to Classic and click OK
After this last step, go back and check the SSRS Report Server or Report Manager and it should be working now.
Hope this helps.
In details, the following are the steps I did to do this:
- Open IIS Manager
- Browse for the SSRS Sites (usually located at Default Website\Reports and Default Website\ReportServer)
- View site settings and find out in which application pool are they using
- Click the Application Pool section in IIS and open the properties of the Application Pool the SSRS sites use
- Set the Manage pipeline mode to Classic and click OK
After this last step, go back and check the SSRS Report Server or Report Manager and it should be working now.
Hope this helps.
Wednesday, March 7, 2012
How to Add JavaScript Validation/Attributes/Properties to Forms using Html.BeginForm()
To add a JavaScript validation, an attribute or properties to an HTML form generated in ASP.NET MVC using Html.BeginForm(), you can pass null values to the action and controller parameters to get the same result as Html.BeginForm():
Sample:
using (Html.BeginForm(null, null, FormMethod.Post,
new { onsubmit = "return validateForm();" }))
{
}
Source: http://stackoverflow.com/questions/216600/html-beginform-and-adding-properties
new { onsubmit = "return validateForm();" }))
{
}
Source: http://stackoverflow.com/questions/216600/html-beginform-and-adding-properties
Sunday, March 4, 2012
Installing SQL Server Management Studio 2005 When SSMS Did Not Install Properly
There are some cases when the SQL Server Management Studio 2005 fails to install after installing all the components of SQL Server.
To fix this you can manually install this tool, by browsing on Disc 2 of the installation disks and executing the setup file for this tool:
[Disk 2 Root]\Setup\SqlRun_Tools.msi
During the setup just select the option to include the SQL Server Management Studio and install.
To fix this you can manually install this tool, by browsing on Disc 2 of the installation disks and executing the setup file for this tool:
[Disk 2 Root]\Setup\SqlRun_Tools.msi
During the setup just select the option to include the SQL Server Management Studio and install.
Monday, February 27, 2012
Solution to: The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
Apparently, Entity Framework doesn't allow the use of the Date member of DateTime inside an Entity Framework LINQ Query. The following query fails because of the use of .Date
var salesResult = (from sale in T_Sales
where ((DateTime)sale.Sale_Date).Date == DateTime.Today
select sale).ToList();
The above code will raise the following exception:
I found out form this link that there are EntityFunctions available. So the above code can be replaced with the code below to work:
var salesResult = (from sale in T_Sales
where EntityFunctions.TruncateTime((DateTime)sale.Sale_Date) == DateTime.Today
select sale).ToList();
However checking the details of this EntityFunctions on the MSDN site I found out that it is only available to Framework 4.0 and 4.5.
var salesResult = (from sale in T_Sales
where ((DateTime)sale.Sale_Date).Date == DateTime.Today
select sale).ToList();
The above code will raise the following exception:
The specified type member 'Date' is not supported
in LINQ to Entities. Only initializers, entity members, and entity navigation
properties are supported.
I found out form this link that there are EntityFunctions available. So the above code can be replaced with the code below to work:
var salesResult = (from sale in T_Sales
where EntityFunctions.TruncateTime((DateTime)sale.Sale_Date) == DateTime.Today
select sale).ToList();
However checking the details of this EntityFunctions on the MSDN site I found out that it is only available to Framework 4.0 and 4.5.
Wednesday, November 23, 2011
How to use CompareValidator to validate dates in different format (e.g., dd/MM/yyyy)?
If you want to use the ASP.NET CompareValidator control to validate dates in a different format, you can setup the Page to your desired culture. You can do this by either setting up the value in the page directive as shown below:
Or by setting it up in the page load event:
For example if you want to validate a date in Australian Date Format, which is dd/MM/yyyy, you can do:
<%@ Page culture="your culture here" %>
Or by setting it up in the page load event:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Page.Culture = "your culture here"; } }
For example if you want to validate a date in Australian Date Format, which is dd/MM/yyyy, you can do:
<%@ Page culture="en-AU" %>
Or:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Page.Culture = "en-AU"; } }
Subscribe to:
Posts (Atom)