Thursday, 15 March 2012

"proj" cannot be opened because it's project type (.csproj) is not supported by this version of the application

If you are using VS2008 pro and get this error it could be you have some un-installed but required components. Re-run an installation while checking to make sure all required components are selected for install.

Also discovered quite by accident, that you'll get the same sort of error...

'C:\Users\Username\Documents\Visual Studio 2010\Projects\ProjectFolder\Projectname\Project.csproj cannot be opened because it's project type (.csproj) is not supported by this version of the application'

...if you are using Visual Basic 2010 Express and do something silly, like try to open a C# solution (.sln file) that was created and saved in Visual C# 2010 Express --- of course!!! The proj file would have been saved with a .csproj extension, and so the .sln file has a reference to a .csproj file.

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

You may run into this error when you attempt to reference and consume an Entity Data Model that has been created in a stand-alone project as a class library, from a new 'client' project such as a Windows Forms project, Windows Console App, or an ASP.Net project.

FIX:
The reason for the error is, after you add a reference in the consuming project to the Entity Data Model DLL, you mustn't forget to either:

a) create your own .config file in the consuming project and add the connectionstring entry of the Entity Data Model,
or
b) copy the App.config file from the Entity Data Model project, into the consuming project (by right-clicking the Project > Add Existing Item > Navigating to the Entity Data Model project and selecting its App.config file).

Also worth checking to make sure that the model's MetaData Artifact Processing property is set to 'Embed in Ouput Assembly' which effectively ensures all the required schema files are embedded into the compiled DLL as resources, and are also made a part of the connection string for the model. (In the Entity Data Model project, double-click to open the model and check it’s MetaData Artifact Processing property in the Properties window, by default this should already be set to ‘Embed in Output Assembly’).

Wednesday, 14 March 2012

Sequence in which events are raised for Pages, UserControls, etc...

...understanding the page life cycle...
during a debugging session, this information came in handy, but rather than re-create it all here, I figure it's best to just link to the original forum post here >> 

Reading embedded resources in .Net

I always forget the first important step; i.e. remember to mark the Build Action property of a resource to "Embedded resource"

Then use:

Assembly myAssembly = GettingExecutingAssembly();
Stream myStream = myAssembly.GetManifestResourceStream(name-and-path-string-to-embedded-resource);


Where name-and-path-string-to-embedded-resource is the full namespace string of the resource e.g. "myproject.images.image.png"

Wednesday, 7 March 2012

Error code 0x80070035 The network path was not found, or Windows cannot access (my PC)

Windows Error 0x80070035 while trying to connect to shared folders on a desktop PC from a laptop, both on a wireless network (and both running Vista). And yes, the folders were definitely shared on the desktop PC.

Zone Alarm installed and running on both machines in addition to Windows Firewall. And both machines also running AVG antivirus software.

I tried all the fixes I could think of, as well as every suggestion I could find online;

  • checking via ipconfig/all for, and PINGing, ip address and machine name of each machine (PING from desktop to laptop would time out, but no problems PINGing desktop from the laptop)
  • making sure all required services are running on both machines -  DNS Client, DHCP Client, Computer Browser, TCP/IP NetBIOS Helper, FDResPub, SSDP Discovery, etc, Automatic WLAN Configuration(Vista), Wireless Zero Configuration(XP), WLAN AutoConfig(Win7).
  • making sure Windows Firewall exceptions are enabled for File and Printer Sharing, and Network Discovery
  • making sure Network Discovery is turned on in Vista's "Network and Sharing Center"
  • etc


























FIX:
In this particular case, as it turns out, what was required was quite simply to stop the Zone Alarm instance running on the client machine (laptop), and the problem was resolved. Could now PING laptop from desktop command prompt, but more importantly, could now also access shared folders on desktop from the laptop!

I would assume it's possible to tinker with the settings/configurations within Zone Alarm on the client without having to turn it off altogether, but was happy for now to just turn it off so I could get on with other stuff.


Additional options:

Enable NetBIOS over TCP/IP on all computers:

1)   Go to “Control Panel\Network and Internet\Network Connections”.
2)   Right-Click on the connection and choose Properties.
3)   Click “Internet Protocol (TCP/IP) Version 4” in the list.
4)   Click Properties, and then click Advanced.
5)   On the Advanced TCP/IP settings windows, go to “WINS” tab.
6)   Under NetBIOS setting, click “Enable NetBIOS over TCP/IP”, and then click OK.

2.    On the Windows 7 and Windows Vista computers, please go to “Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings” and ensure that the following items are turned on:

Network Discovery
File and printer sharing

And this one is OFF:

Password protected sharing

social.technet.microsoft.com

The device closed remote access function, you are forbidden now.

If you get this error when you try to log into a (siemens gigaset se587) router's web admin interface, check that you are trying to log in to the LAN IP of the router and not the public IP:

e.g. 192.168.1.1/

notice there is no port number (for example :200) or any additional url string or url parameters after the backslash following the ip address.

You can verify your router's ip address by checking for the default gateway. From the command prompt (in Vista this is: Start Menu->All Programs->Accessories->Command Prompt), type in ipconfig /all. Part of the resulting 'Windows IP Configuration' listing should show what your Default Gateway is.

Tuesday, 14 February 2012

firewallport:HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List\\1313:UDP

If Windows Defender Real-Time Protection report returns this string:

"
Path Found: firewallport:HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List\\1313:UDP"

This is a potential security risk. Although protocol TCP port 1313 is flagged as a virus, it doesn't necessarily mean that a virus is currently using port 1313, but does mean that a Trojan or Virus has used this port in the past to communicate with your computer.



Also if you get the string: "Path Found: firewallport:HKLM\System\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List\\1458:UDP"


This should be a concern too, as Port 1458 has known security vulnerabilities, because this port is commonly used by Trojans and viruses (for remote code execution).