Tips, Tricks, and Fixes for when your computer doesn't do what it's told.

Tuesday, January 18, 2011

Add/Delete certificates for local system account

For services applications that are running under the local system account, certificates can be added for that account by running a snap-in for the MMC. When a certificate is added to the registery for the local system, it can then be reached by the service for authentication.

-- Select StartRun and enter mmc.
-- In the console, select FileAdd/Remove Snap-in
-- Select Add, then select Certificates and click Add
-- To manage certificates, select the option Computer Account and click Next
-- Select Local computer and click Finish
-- Click Close, then Okay
-- Expand the tree for Certificates/Trusted root/Certificates
-- The trusted root certificates (accessed as "ROOT" in code) can be managed from here

More information can be found at:
http://technet.microsoft.com/en-us/library/bb680501.aspx

VS 2008 MVC "Project Type not supported"

When trying to open some sample MVC .csproj or vb.proj project files, the error returned "The project file "\\home\username\Data\Visual Studio 2008...Commerce.MVC.Web.csproj" cannot be opened. The project type is not supported by this installation."


This can be fixed by editing the project file for the element . The guid should be changed to "{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}"


More information can be found here:



Tuesday, December 23, 2008

ReportViewer.Reset()

If compiling and running a project or website with a report view component generates the error Method not found: 'Void Microsoft.Reporting.WebForms.ReportViewer.Reset()' or 'Reset' is not a member of 'Microsoft.Reporting.WebForms.ReportViewer':

Download a fresh ReportViewer:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E7D661BA-DC95-4EB3-8916-3E31340DDC2C&displaylang=en

Monday, December 22, 2008

Insert Error Using ObjectDatasource and TableAdapter

Using an ObjectDataSource bound to a FormView, when calling the Insert method, the error "ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'methodname' that has parameters:...etc" This error is caused because TableAdapter is tacking the ID field to the end of the calling parameters even though it is not specified in the tags.

To avoid this problem, the ID field must be bound on the page and editable.

Or the ID field should not be on the page at all. In my particular case, this was the problem, since I did not want my users to edit the primary key of course, but I wanted it visible in a label field. Removing the label field, made the error go away.

More observations on this error can be found at http://weblogs.asp.net/bradygaster/archive/2006/09/26/How-to-Bloody-Your-Forehead.aspx

Monday, October 27, 2008

RUNAS syntax

To open a new command window for a different profile, the syntax is:

runas /netonly /user:domain\user "cmd"
or
runas /noprofile /user:domain\user "cmd"

These should prompt for your password and then open a DOS command window in the context of the specified user.

Friday, August 15, 2008

TimeTracker Stater Kit setup

Installing the TimeTracker starter kit required additional steps. Here are all the steps:

  • Download and execute time.vsi
  • In Visual Studio 2005, select FileNewWeb Site, then select the Time Tracker Starter Kit. (Use File System for Location)
  • On local SQL server, create a new database named TimeTracker.
  • Run the program C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe.
    (Note: You want to run this first so that the next procedure will not generate errors)
  • Run the procedure timetracker-add.sql (found in the App_Data section in the project) on the database (be sure to select TimeTracker in the database list).
  • Change the web.config file in the application to point to the database. Note: There are two connection strings (aspnet_staterKits_TimeTracker and LocalSqlServer)
  • Create the three roles Consultant,ProjectManager,ProjectAdministrator. In Visual Studio, select from the top menu Website|ASP.NET Configuration. In Web Stie Admin Tool use Security|Create or Manage Roles
  • Run the application and use the Create New User link from the opening login page.

Monday, May 5, 2008

Active Sync

To suppress the ACtive Sync "New Partnership" dialog everytimt the device is set into the cradle, create a .reg file with the contents:
REGEDIT4[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services]"GuestOnly"=dword:00000001
Run the reg file by double clicking it.

http://msdn.microsoft.com/en-us/library/aa911568.aspx