Sunday, October 2, 2011

The type was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.

Post from: http://www.johnsoer.com/blog/?p=125&cpage=1#comment-5494

  1. public class Test
  2. {
  3. private string _Field = "";
  4. public string Field
  5. {
  6. get { return _Field; }
  7. set { _Field = value; }
  8. }
  9. }
  10. public class TestInherited : Test
  11. {
  12. }
  13. public class Container
  14. {
  15. private Test ivField;
  16. public Test Field
  17. {
  18. get { return _Field; }
  19. set { _Field = value; }
  20. }
  21. }
  22. Container _Test = new Container();
  23. _Test.Field = new TestInherited();
Solution:
new XmlSerializer(typeof(Container), new Type[] { typeof(TestInherited) });


This solution was not working for me because:

There was a namspace on my XmlRoot element [XmlRoot("Container", Namespace = "http://namespace", IsNullable = false)]

When i removed namespase, the problem was gone.

Hope this helps someone.

Tuesday, September 20, 2011

Setup WRT54G (or similar) running DD-WRT as Access Point

Blog from: http://www.maximumpc.com/forums/viewtopic.php?t=59541

Setup > Basic Setup > WAN Connection Type: Connection type: Automatic Configuration - DHCP

Enter a good (outside of your DHCP range) IP address (and, of course, match your current subnet);

Setup > Basic Setup > Network Address Server Settings (DHCP): DHCP Server: Disable
Setup > Advanced Routing > Operating Mode: Operating Mode: Router
Setup > Advanced Routing > Dynamic Routing: Interface: Both
Setup > Advanced Routing > Static Routing: Interface: LAN & WLAN

Wednesday, February 16, 2011

SSRS 2008 R2 and UAC problem

Post from: http://calebs71.blogspot.com/2010/09/ssrs-2008-domain-user-issue.html

Scenario: I have a new SQL Server Reporting Services 2008 R2 x64 instance that works if you are the local administrator. Once I switch to another user who is an implied administrator via an AD group I get the following error when attempting to access SSRS in a browser:

"User 'TESTDOM\user' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed."

The user is a member of the domain admins group which is obviously a member of the local admins. Also if I right click on IE8 and say "Run As Administrator" it works. The quick fix is to disable the UAC. If you don't want to do that then just do the below:

1. Launch IE8 using "Run As Administrator" and in SSRS (http://servername/Reports) click on Site Settings. In Site Settings navigate to "Security" and add your user "TESTDOM\user" as a System Administrator.

2. Click on "Home" and then "Folder Settings". Now add your account again this time assigning yourself all the roles (Browser, Content Manager, My Reports, Publisher, Report Builder).

3. Close Administrative IE session and open a normal IE8 window and your SSRS should work.

Wednesday, January 12, 2011

Fix SharePoint 2010 alert url's

http://technet.microsoft.com/en-us/library/cc508847.aspx

Monday, January 3, 2011

Login failed for user .

Server Name: \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

Error Number: 18456

Severity: 14

State: 1


Run SSMS as Administrator.

Friday, July 9, 2010

Could not create SSOSQL. Error Code: 0x80131700

This is for x64 OS:

"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe" "C:\Program Files\Common Files\Enterprise Single Sign-On\win32\ssosql.dll"
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" "C:\Program Files\Common Files\Enterprise Single Sign-On\win32\ssosql.dll"
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe" "C:\Program Files\Common Files\Enterprise Single Sign-On\ssosql.dll"
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" "C:\Program Files\Common Files\Enterprise Single Sign-On\ssosql.dll"

Friday, April 16, 2010

Restoring SQL Server 2005 Suspect Database

Post from: http://mshehadeh.blogspot.com/2007/09/restoring-sql-server-2005-suspect.html

EXEC sp_resetstatus 'DBname'

ALTER DATABASE "DBname" SET EMERGENCY

DBCC checkdb('DBname')

ALTER DATABASE "DBname" SET SINGLE_USER WITH ROLLBACK IMMEDIATE

DBCC CheckDB ('DBname', REPAIR_ALLOW_DATA_LOSS)

ALTER DATABASE "DBname" SET MULTI_USER