// Comment //create XML
XmlDocument doc = new XmlDocument();
//header
XmlDeclaration decl = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
doc.AppendChild(decl);
//
doc.Schemas.Add("test:schema:v1", "http://sample.com/schema.xsd");
XmlElement decElem = doc.CreateElement("root");
XmlAttribute attr = doc.CreateAttribute("xsi", "schemaLocation", "http://www.w3.org/2001/XMLSchema-instance");
attr.Value = "test:schema:v1 schema.xsd";
decElem .Attributes.Append(attr);
decElem .SetAttribute("xmlns", "decElem");
doc.AppendChild(docElem);
Tuesday, July 10, 2012
Dynamicly add xsi:schemaLocation="location" to XML
Friday, March 30, 2012
Can't connect to TFS 2010
I've tried:
I've checked the port 8080 in windows firewall, and was allowed through the firewall but the rule was set to PUBLIC and the network is PRIVATE. Added "private" to the rule and everything works again.
- Stop Collection / Start Collection
- Detach / Attach Collection
- IIS Stop, Strat , Reset
- Flush DNS
- Reinstalled TFS
I've checked the port 8080 in windows firewall, and was allowed through the firewall but the rule was set to PUBLIC and the network is PRIVATE. Added "private" to the rule and everything works again.
Labels:
Error connecting,
TFS 2010,
Visual Studio 2010,
VS2010
Friday, March 23, 2012
Error when changing an applications Target Framework from 2.0 to 4.0
I've had a problem with Crystal Reports when changing an applications Target Framework from 2.0 to 4.0
Error:
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
Resolution:
Add the following to app.config:
Error:
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.
Resolution:
Add the following to app.config:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime Version="v4.0" sku=".NETFramework, Version=v4.0" />
startup>
System: VS 2010, Crystal Reports 13, Windows 7 x64
Labels:
C#,
Crystal Reports 13,
Programming,
Visual Studio 2010,
windows 7
Monday, October 17, 2011
Remove Visual Studio autogenerated control from Toolbox
If you have a project that uses a lot of visual database components, you will see that those components are auto generated and present in the toolbox causing Visual Studio to run slower. To get rid of those components go to: Tools - Options - Windows Form Designer and set AutoToolboxPopulate to false and restart Visual Studio
Labels:
SpeedUp,
ToolBox,
Visual Studio
Make Visual Studio 2010 use more than 2GB of RAM
Tested on Windows 7 Ultimate x64:
- Make a backup of 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devaenv.exe'
- Add 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin' without quotes to PATH variable
- Open cmd under: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
- Run in cmd: 'editbin /LARGEADDRESSAWARE devenv.exe' without quotes
- Restart
Labels:
More Ram,
Visual Studio 2010,
windows 7,
x64
Friday, June 3, 2011
The stub received bad data
"System.Runtime.InteropServices.COMException (0x800706F7): The stub received bad data. (Exception from HRESULT: 0x800706F7)
at Word.Find.Execute("
To work around this issue, follow these steps:
1. Click Start, click Run, type Regedit in the Open box, and then click OK.
2. Locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
3. Right-click the registry key that you located in step 2, click New, and then click Key.
4. Type OleAut, and then press ENTER.
5. Right-click OleAut, click New, and then click DWORD
6. Type DisableShield, and then press ENTER.
7. Right-click DisableShield, and then click Modify.
8. In the Value data box, type 00000001, and then click OK.
9. On the File menu, click Exit to quit Registry Editor.
Note: This workaround disables some security checks that have been implemented in the Windows Server 2003 and Windows XP operating systems. Therefore, we recommend that you use this workaround to test whether the hotfix that this article describes will resolve the problem that you are experiencing. We do not recommend that you use this workaround as a permanent resolution for this problem.
More info:
http://support.microsoft.com/kb/895321/
at Word.Find.Execute("
To work around this issue, follow these steps:
1. Click Start, click Run, type Regedit in the Open box, and then click OK.
2. Locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
3. Right-click the registry key that you located in step 2, click New, and then click Key.
4. Type OleAut, and then press ENTER.
5. Right-click OleAut, click New, and then click DWORD
6. Type DisableShield, and then press ENTER.
7. Right-click DisableShield, and then click Modify.
8. In the Value data box, type 00000001, and then click OK.
9. On the File menu, click Exit to quit Registry Editor.
Note: This workaround disables some security checks that have been implemented in the Windows Server 2003 and Windows XP operating systems. Therefore, we recommend that you use this workaround to test whether the hotfix that this article describes will resolve the problem that you are experiencing. We do not recommend that you use this workaround as a permanent resolution for this problem.
More info:
http://support.microsoft.com/kb/895321/
Labels:
C#,
Programming,
Word interop
Thursday, January 20, 2011
ClickOnce Installation Location
Windows XP:
C:\Documents and Settings\\Local Settings\Apps
Windows Vista/Windows 7:
C:\Users\\AppData\Local\Apps
C:\Documents and Settings\
Windows Vista/Windows 7:
C:\Users\
Labels:
clickonce,
windows 7,
windows xp
Subscribe to:
Posts (Atom)