Jul132010

AssemblyCulture

Published by Pete Celliers at 10:45 AM under Errors

Error: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Compilation.BuildResultCompiledGlobalAsaxType'

Solution:

search for "AssemblyCulture" and make sure to delete the culture or put a valid one in.
e.g. [assembly: AssemblyCulture("THIS_IS_INVALID")]

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Jun282010

SQL 2008 modifying table structures from within Management Studio

Published by Pete Celliers at 5:16 PM under Errors | SQL SERVER

The error message:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.


This can be fixed by the following steps:

Tools -> Options -> Designer Page -> "Prevent saving changes that require table re-creation" -> uncheck



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

May202010

Content controls are allowed only in content page that references a master page

Published by Pete Celliers at 5:29 PM under Errors

Solutions to the following error:

Content controls are allowed only in content page that references a master page

You get this error when you have no masterpage assigned to your web form

Options to consider (other than simply adding your masterpage statically):

 You can derive all your pages from a base page in the web config file:

    <system.web>
      <pages pageBaseType="BasePage" >

then create a class and declare it as follow:

    public class BasePage : System.Web.UI.Page { ....

with the following method in it:

    protected override void OnPreInit(EventArgs e)
    {
        string ThemeName = "Bitlink";
        //this should point to your masterpage:
        MasterPageFile = VirtualPathUtility.ToAbsolute(("~/")) + "Themes/" + ThemeName + "/Master.master";
        base.OnPreInit(e);
    }

this way all your pages would be assigned to a certain masterpage dynamically.

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 1 Responses

Apr282010

Value cannot be null. Parameter name: propName

Published by Pete Celliers at 6:43 PM under Errors

you get the error: Value cannot be null. Parameter name: propName

the reason could be (it was in my case) that the gridview you are trying to bind contains a comma with no further fields as follow:

  .... DataKeyNames="FullNo1,StudyNo,"

feel free to post other solutions to this error



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Apr142010

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered

Published by Pete Celliers at 12:36 PM under Errors

This happens if you run your application in 64bit
(using the Jet for excel etc)

simply switch to 32bit 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar232010

a project with that name is already opened in the solution

Published by Pete Celliers at 1:38 PM under Errors

The following message a project with that name is already opened in the solution when you try to add -> existing project ... to your solution.
dependency : AnkhSvn

This is an problem with AnkhSvn for which the following work around works well:

be careful and please backup/make a copy of your solution file before proceeding:

open your solution file with notepad or similar and search for the reference to the existing project:
(mine looked as follows)

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraspTest", "GraspTest\GraspTest.csproj", "{28F01283-3324-4E3C-A1FE-C256F29130A6}"
EndProject

Just delete this entry and try again.

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Feb222010

IE view source not working

Published by Pete Celliers at 2:45 PM under Errors

For some reason this sometimes happen when your browsing history becomes too large.

Simply click "tools", "Delete Browsing History"

or shortcut to this ...... control shift delete 

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Sep072009

Database diagram support objects ... error

Published by Pete Celliers at 12:14 PM under Errors | SQL SERVER

Database diagram support objects cannot be installed because this database does not have a valid owner.

This sometimes happen when you attach a database from a different machine or after restoring a database from scratch


Solution:

EXEC sp_dbcmptlevel '<<DBNAME>>', '90';
go
ALTER AUTHORIZATION ON DATABASE::<<DBNAME>> TO "<<LOGINNAME>>"
go
use <<DBNAME>>
go
EXECUTE AS USER = N'dbo' REVERT
go



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Sep012009

SQL fix users

Published by Pete Celliers at 1:27 PM under Errors | SQL SERVER

Cannot open database "DBName" requested by the login. The login failed.
Login failed for user 'DBUser'.

This sometimes happen when you attach a database from a different machine
(because the security doesn't reside inside the database itself)


Solution:

use <<DBNAME>>
go

---create LOGIN <<USERNAME>> WITH PASSWORD = '<<PASSWORD>>' , check_policy = off;
---OR (uncomment which one is needed)
alter LOGIN <<USERNAME>> WITH PASSWORD = '<<PASSWORD>>' , check_policy = off;
go

exec sp_change_users_login 'Auto_Fix', '<<USERNAME>>', null, '<<PASSWORD>>'
go


Make sure your username and password match the web.config file's: <configuration>
     <
connectionStrings>
          <
clear/>
          <
add name="MyConnectionString" connectionString="Data Source=MYPC\SQL2005;Initial Catalog=DBNAME;Persist Security Info=True;User ID=<<USERNAME>>;Password=<<PASSWORD>>" providerName="System.Data.SqlClient"/>



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags:

E-mail | Permalink | Post RSSRSS comment feed 0 Responses

Mar102009

Troubleshooting SQL errors

Published by Pete Celliers at 12:05 PM under Errors

Some of the errors I've come accross and how to resolve them:

Cannot open user default database. Login Failed

This occurs when you have deleted the database that your login uses as the default database.
If you still have your connection open to the database engine then run the following sql command:

alter login [petelaptop\pete] with default_database = master

if you have lost your connection you have to connect as follow using the command prompt:

sqlcmd -d master -U <<your username here>> -P <<your password here>>

(this will connect using the master database rather than the default which is now deleted.)

 



[KickIt] [Digg] [del.icio.us] [Facebook] [Google] [StumbleUpon]

Tags: ,

E-mail | Permalink | Post RSSRSS comment feed 0 Responses