The .vbproj.user file contains the path to old references in
Wednesday, 3 October 2007
Upgraded VB 2003 project has the old 2003 references.
Upgraded a VB 2003 Project and its dependent projects to VB 2005 and it has some file reference to some of the VB 2003 projects. When try to remove the reference to 2003 version of the assemblies and explicitly reference 2005 version , the reference switch back to version 2003.
The .vbproj.user file contains the path to old references in entry. Remove the 2003 version assembly paths.
The .vbproj.user file contains the path to old references in
Expose Public Functions in a .Net COM component
Use attribute . The ComClassAttribute attribute instructs the compiler to add metadata that allows a class to be exposed as a COM object.
Tuesday, 2 October 2007
Free book and Code samples for Visual Basic 2005
Free Book - Introducing Microsoft Visual Basic 2005 for Developers
http://msdn2.microsoft.com/en-us/vbrun/ms788235.aspx
101 Code Samples for Visual Basic 2005
http://msdn.microsoft.com/vbasic/downloads/code/101samples/
http://msdn2.microsoft.com/en-us/vbrun/ms788235.aspx
101 Code Samples for Visual Basic 2005
http://msdn.microsoft.com/vbasic/downloads/code/101samples/
Menus displayed twice in Visual Studio 2005 IDE
Execute the the following command line switches to resolve this issue.
1. devenv /resetsettings
2. devenv /resetuserdata
3. devenv /setup
If only the Crystal Menus are displaying twice then repair the Crystal Reports using the following command
msiexec /f {94FB0978-D094-40C7-91D7-834D39220D4A}
1. devenv /resetsettings
2. devenv /resetuserdata
3. devenv /setup
If only the Crystal Menus are displaying twice then repair the Crystal Reports using the following command
msiexec /f {94FB0978-D094-40C7-91D7-834D39220D4A}
How can we change the Encoding format in Visual Studio 2005
Advanced Save option is the only choice in Visual Studio to change the encoding property for a file and there is no other options to change the encoding property for the entire solution.
We can create an Add-in for detecting the encoding and warn the users or display the "Advanced Save As" dialog when saving the files. Add-Ins provides the ability to extend and automate the Visual Studio Integrated development environment.
We can create an Add-in for detecting the encoding and warn the users or display the "Advanced Save As" dialog when saving the files. Add-Ins provides the ability to extend and automate the Visual Studio Integrated development environment.
.Net My.forms collection is not showing some of the forms
My.Forms exposes only a default instance of each of the form classes and it displays only the forms with parameterless constructor. i.e. If the form contains a constructor which has some parameters, this form won't be exposed as part of the My.Forms
The compiler will only generate a parameterless constructor for a form if there is no constructor present at all. This behavior is by design.
The compiler will only generate a parameterless constructor for a form if there is no constructor present at all. This behavior is by design.
Different ways to configure security permissions for a .Net application in client computers
1. Using Microsoft .NET Framework 1.1 Configuration tool, we can configure the permissions and create an msi
2. Create a bat file contains Caspol instructions.
3. Develop a VBScrit with Caspol instructions and configure it as a login script in Active Directory
2. Create a bat file contains Caspol instructions.
3. Develop a VBScrit with Caspol instructions and configure it as a login script in Active Directory
Monday, 1 October 2007
Missing Location path, Reference folder, Build configurations in Visual Studio 2005
There are several Microsoft Visual Studio 2005 project files that are hidden in Solution Explorer by default. These files appear when you click Show All Files (Solution Explorer-> Show All Files icon).
For getting the option to select the directory when creating a new application, we need to enable the “Save new Projects when created” option in tools -> Options -> Project and solutions -> General.
For enabling build configurations option we need to select the “Show advanced build configurations” check box in Tools -> Options -> Project and Solutions.
For getting the option to select the directory when creating a new application, we need to enable the “Save new Projects when created” option in tools -> Options -> Project and solutions -> General.
For enabling build configurations option we need to select the “Show advanced build configurations” check box in Tools -> Options -> Project and Solutions.
VB 2005 WebBrowser app crashes with the error "The instruction at "0x30cb0a4f" referenced memory at "0x00000000". The memory could not be written"
when closing VB 2005 windows application, its showing the error message " Application.exe - Application Error The instruction at "0x30cb0a4f" referenced memory at "0x00000000". The memory could not be written" . Click on OK to terminate the program.". It happens if the WebBrowser control loads a SharePoint web site.
Resolution:
---------------
Assign "about:blank" as the url property of the web browser control and in the form load use the Navigate function to display the website
It is caused by WebBrowser control.
1. The form can be shown when the WebBrowser control loads a SharePoint site. The application crashes when the form is unloaded. So we add the following code to work around the problem. Basically, load "about:blank" on WebBrowser control before the form is unloaded.
Public Class Form1
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
If WebBrowser1.Url.AbsoluteUri <> "about:blank" Then
Me.Visible = False
AddHandler WebBrowser1.DocumentCompleted, AddressOf WebBrowser1_FinishClosingForm
WebBrowser1.Navigate("about:blank")
e.Cancel = True
End If
End Sub
Private Sub WebBrowser1_FinishClosingForm(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
CoFreeUnusedLibraries()
Me.Close()
End Sub
End Class
Resolution:
---------------
Assign "about:blank" as the url property of the web browser control and in the form load use the Navigate function to display the website
It is caused by WebBrowser control.
1. The form can be shown when the WebBrowser control loads a SharePoint site. The application crashes when the form is unloaded. So we add the following code to work around the problem. Basically, load "about:blank" on WebBrowser control before the form is unloaded.
Public Class Form1
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
If WebBrowser1.Url.AbsoluteUri <> "about:blank" Then
Me.Visible = False
AddHandler WebBrowser1.DocumentCompleted, AddressOf WebBrowser1_FinishClosingForm
WebBrowser1.Navigate("about:blank")
e.Cancel = True
End If
End Sub
Private Sub WebBrowser1_FinishClosingForm(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
CoFreeUnusedLibraries()
Me.Close()
End Sub
End Class
Remote VBScript issues
1. Install the latest version (5.6.0.8831) of Windows Script 5.6
For Windows Server 2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=887fce82-e3f5-4289-a5e3-6cbb818623aa&DisplayLang=en
For Windows XP and Windows 2000
http://www.microsoft.com/downloads/details.aspx?FamilyID=c717d943-7e4b-4622-86eb-95a22b832caa&DisplayLang=en
2. Check the registry key HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings\Remote, make sure it is 1 and the type is "REG_SZ"
3. Register wscript.exe with DCOM using the command “wscript.exe –regserver”
Restarte the machine and try to execute the script locally in the Win 2003 machine if it works fine try to execute it remotely.
4. Check is there any errors reported in the win 2003 server’s event log
5. Please have a look at this article and implement the steps mentioned in this article. http://support.microsoft.com/default.aspx?scid=kb;en-us;875605#6
If the Windows Firewall in Control Panel is enabled, you need to do the following to make the remote script.
a. On the Exceptions Tab, choose "Add Port", Name is "RPC" and the port is 135
b. On the Exceptions Tab, choose "Add Program", click on "Browse" button and choose "wscript.exe" from c:\windows\system32 or c:\winnt\system32
6. Try to add the following permissions.
a. Add the Specific user (network user who try to execute the script) and Everyone in DCOM Config -> MyComputer -> ComSecurity ->Access Permission and select the Local Access and Remote Access
b. Add the Specific user and Everyone in DCOM Config -> MyComputer -> ComSecurity ->Launch and Activation Permissions and select the Local Launch, Remote Launch, Local Activation and Remote Activation
c. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Launch and Activation Permissions and select the Local Launch, Remote Launch, Local Activation and Remote Activation
d. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Access Permissions and select the Local Access and Remote Access
e. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Configuration Permissions and select Full Control and Read
Restart the machines and try to execute the script.
7. Check is there any Hardware Firewall. The Port 135 should allow two-way communication.
For Windows Server 2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=887fce82-e3f5-4289-a5e3-6cbb818623aa&DisplayLang=en
For Windows XP and Windows 2000
http://www.microsoft.com/downloads/details.aspx?FamilyID=c717d943-7e4b-4622-86eb-95a22b832caa&DisplayLang=en
2. Check the registry key HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings\Remote, make sure it is 1 and the type is "REG_SZ"
3. Register wscript.exe with DCOM using the command “wscript.exe –regserver”
Restarte the machine and try to execute the script locally in the Win 2003 machine if it works fine try to execute it remotely.
4. Check is there any errors reported in the win 2003 server’s event log
5. Please have a look at this article and implement the steps mentioned in this article. http://support.microsoft.com/default.aspx?scid=kb;en-us;875605#6
If the Windows Firewall in Control Panel is enabled, you need to do the following to make the remote script.
a. On the Exceptions Tab, choose "Add Port", Name is "RPC" and the port is 135
b. On the Exceptions Tab, choose "Add Program", click on "Browse" button and choose "wscript.exe" from c:\windows\system32 or c:\winnt\system32
6. Try to add the following permissions.
a. Add the Specific user (network user who try to execute the script) and Everyone in DCOM Config -> MyComputer -> ComSecurity ->Access Permission and select the Local Access and Remote Access
b. Add the Specific user and Everyone in DCOM Config -> MyComputer -> ComSecurity ->Launch and Activation Permissions and select the Local Launch, Remote Launch, Local Activation and Remote Activation
c. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Launch and Activation Permissions and select the Local Launch, Remote Launch, Local Activation and Remote Activation
d. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Access Permissions and select the Local Access and Remote Access
e. Add the Specific user and Everyone in DCOM Config -> WSHRemote -> Security ->Configuration Permissions and select Full Control and Read
Restart the machines and try to execute the script.
7. Check is there any Hardware Firewall. The Port 135 should allow two-way communication.
Subscribe to:
Posts (Atom)