SomaFM commercial free internet radio Paul Sturm | My notebook of discovered facts

Paul Sturm

My notebook of discovered facts

How to change the path/move a project in Visual Studio

  • Close the solution.
  • Rename the folders outside Visual Studio.
  • Open the solution, ignoring the warnings.
  • Go through all unavailable projects.
    • Set the property 'File Path' to the new location.
    • Reload the project.
    • In case you didn't rename the project, rename it (F2).
  • Taken from here: http://stackoverflow.com/questions/211241/how-do-i-rename-a-project-folder-from-within-visual-studio


    Categories: Visual Studio
    Permalink | Comments (0) | Post RSSRSS comment feed

    SSRS: Could not load type 'Microsoft.ReportingServices.UI.GlobalApp'

    I suspect some MS patch caused this as no one has touched this server in months yet today, we got the following:

     

    Server Error in '/Reports' Application.

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type 'Microsoft.ReportingServices.UI.GlobalApp'.

    Source Error:

    Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.ReportingServices.UI.GlobalApp" %>
    

    Source File: d:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportManager\global.asax    Line: 1


    Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407

    The solution is presented in the error message. Notice the bottom line in the error message: 'Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407 ' - This should be running .NET 2 so we change the mapping for the applicaiton, /Reports and /ReportServer virtual folders to use V2 of .NET again (right click > properties > ASP.NET tab).

     


    Permalink | Comments (15) | Post RSSRSS comment feed

    Database diagrams on disconnected devices

    If you try to use the database diagram feature in SQL Server Management Studio and the owner of the database is a domain id but you are disconnected from the domain (notebook users!), you'll get an error like this:

    "Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

    What you need to do is change ownership of the database:

     

     

     

    /* replace the database name parameters with [CTRL]+[SHIFT]+[M] */

    use master

    go

    ALTER AUTHORIZATION ON DATABASE::<Database_Name, sysname, Database_Name> TO "sa"

    go

    use <Database_Name, sysname, Database_Name>

    go

    EXECUTE AS USER = N'dbo' REVERT

    go

     

     


    Permalink | Comments (0) | Post RSSRSS comment feed

    Securing a single file with IIS7

    With IIS7's revamped interface, I had a hard time locating how to change the permission on a single file. I could see how to do so at a folder level, but I couldn't see how to do so on a single file (.CFM in this case).

     It turns out, once you hilghted the file you want to change the permission on, you right click and select 'Switch to Features View' - this changes to the features view on that one, single file.  Then you can use the Authentication module to set it up the way you want. You can tell you are changing one file by looking at the breadcrum trail in your address bar.


    Categories: Vista | Windows 2008
    Permalink | Comments (1) | Post RSSRSS comment feed

    8.3 Short filenames on Windows 2003 Server

    If you have a document repository of sorts, it may pay to disable short filenames (legacy leftover from Win95 days).

    To check if enabled:

    fsutil.exe behavior query disable8dot3

    To disable:

    fsutil.exe behavior set disable8dot3 1

    This will not remove existing short filenames but the system will no longer generate them.  This also works on XP.

     


    Categories: Windows 2003 | XP
    Permalink | Comments (18) | Post RSSRSS comment feed

    Powershell + 7zip + SQL Server backups

    I needed a way to shrink the backups in SQL Server 2005 (native compression doesn't exist until the 2008 version). 7zip compresses better than most anything, it's free (even for commercial use), its stable, and it's small. Powershell is my favorite tool builder. This is the result:

    #set alias to 7zip - adjust path as necessary
    set-alias sevenZip "c:\program files\7-zip\7z.exe"
    
    #list of database filenames
    $dbdirectories = "db1","db2","db3","db4"
    
    $dbbackupDrive = "x:\"                              # this is where SQL Server stores its backups
    $dbzdestination = "y:\7zipped_backups\"             # this is where we will store the 7z version
    
    #Backups location
    cd "$dbzdestination"                                # change directory 
    
    #create some file masks based on date
    
    $ybu = get-date (Get-Date).addDays(-1) -format "yyyyMMdd"    # this is the filename mask of yesterday's backups
    $yz = get-date (Get-Date).addDays(-1) -format "yyyy.MM.dd"   # this is the filename mask of the zip destination
    $yzr = get-date (Get-Date).addDays(-2) -format "yyyy.MM.dd"  # these are the day old 7zips (unused yet)
                                                                 # I may want to remove older 7zips after copied offsite
                                                                 
    #$exclude1 = "-x!*.dif"                             # unused but could be appended to command 
    #$exclude2 = "-x!*.7z"                              # unused but could be appended to command 
    
    foreach ($dbdirectory in $dbdirectories)            # looping each db name in our list,
    {  
    
        $backuppath = $dbbackupDrive + $dbdirectory + "\"            #build the path to the backup sources
        $backupfiles = $dbdirectory + "_backup_" + $ybu + "*.*"       #build the filename mask
        $input = $backuppath + $backupfiles                          #full path to source files (SQL Server's files)
    
        $outputfile = $dbdirectory + "_backup_" + $yz + ".7z"        #build the 7z filename (7zip file)
    
        cd "$dbzdestination$dbdirectory"               #change the path to the backup destination
        
        # command line switch descriptions (see http://dotnetperls.com/7-zip-examples)
        #   -t7z = 7zip type
        #   -v10m = split to 10 meg files
        #   -mmt = multithreading
        
        "7zip a -t7z -v10m -mmt=off $outputfile $input"               # echo out some progress    
        
        sevenZip a -t7z -v10m -mmt=off "$outputfile" "$input"         # 7zip them up
    
    }
    
    # we're all done, let's cleanup
    Remove-Item Alias:sevenZip
    

    Permalink | Comments (21) | Post RSSRSS comment feed

    Bing Maps API (via URLs)

    I've located a small page that describes the various functions available via Bing maps.

    Permalink | Comments (69) | Post RSSRSS comment feed