Error when adding a Service Reference for a Web Service - c#

I am in a .NET programming class and am creating a simple web service and a console tester to work with it. I am using C#, the IBM .Net data provider (have also tried it with the OLE DB data provider) - both data providers can successfully access and retrieve/update data from the server, and the .NET Framework 3.5.
The web service works, the console tester works (in it's current state), but when I try to add the service reference to link the two together I am getting the following error:
Method not found: '?'.
Metadata contains a reference that cannot be resolved: 'httppp://localhost:64302/WebServiceV2/Service.asmx'.
Metadata contains a reference that cannot be resolved: 'httppp://localhost:64302/WebServiceV2/Service.asmx'.
If the service is defined in the current solution, try building the solution and adding the service reference again.
VS 2010 is able to discover the reference, but when I try to expand the webservice.asmx file or if I press OK, I get this error.
I am running VS 2010 Pro SP1 on a Windows 7 machine (64 bit), on a PC that I use for work.
I have tried to "repair" VS 2010 and I have uninstalled/re-installed it but cannot get around this error. As mentioned I have installed SP1. Also I have installed the "CU3" update, which from what I can tell is a "cumulative" update for VS 2010.
I have discussed this error with my class instructor, fellow co-workers, and the CTO of my company. None of these people have experienced this nor can they duplicate this error with VS 2010 and are at a loss to explain it. This leads me to believe that VS 2010 is okay but there might be something else on my PC that is causing this error - or perhaps I might be missing a key update of some sort. My next approach will be to install this on my home PC (Windows 7 as well) to see if I get different results.

Related

Service Fabric services debugging issues

I have 2 Service Fabric services, which I need to debug. Those services communicate with each other.
I am using:
VS 2017(update 7),
.NET Framework 4.6.1,
Azure SDK 2.9.5.3,
Service Fabric Tools 2.0.20180124.2,
Service Fabric 6.1.456.9494,
Service Fabric SDK 3.0.456.9494
Everything was going alright, but at some point I've started to get following errors, when I try to start debugging 2nd service.
I don't understand why I am getting those errors.(Google produces absolutely nothing on those errors) Here they are:
1st error: Error MSB4064 The "ProjectReferencesWithConfiguration"
parameter is not supported by the "GetServiceProjectReferences" task.
Verify the parameter exists on the task, and it is a settable public
instance
property. \packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets 95
2nd error:Error MSB4063 The "GetServiceProjectReferences" task could
not be initialized with its input parameters.
\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets 94
Here is complete scenario:
One of the services(does not matter which one) in one copy of VS has started successfully without errors.
I've trying to start 2nd service in another copy of VS. And during this attempt I'm getting errors I've mentioned above.
To remedy the situation I have to close offending copy of the VS and open ServiceFabric service project in new VS copy and after that service will start successfully.
Unfortunately all that dancing are getting quite annoying because it's taking up A LOT OF time.
Any help would be appreciated.
I solved this by upgrading Nuget package Microsoft.VisualStudio.Azure.Fabric.MSBuild from version 1.6.4 to 1.6.5
After that also had to manually change 1.6.4 to 1.6.5 in the .sfproj file, as Nuget package manager did not do that automatically.
I had the same issue after upgrading Visual Studio to version 15.6.4 (can't remember what my previous version was). Tried altumano's solution of updating Microsoft.VisualStudio.Azure.Fabric.MSBuild and ran into other errors.
Solution that appears to have worked for me is to upgrade Visual Studio again to version 15.6.6. I still plan to update Service Fabric SDK to a more recent version, but so far this Visual Studio update alone has solved my issue.
It looks like updating Service Fabric SDK to 467 version did the the trick.
I've been working all day today and didn't see pesky error messages during services start up. Now I have in Control Panel\Programs and Features following lines:
Microsoft Azure Service Fabric 6.1.467.9494
Microsoft Azure Service Fabric SDK 6.1.467.9494
Upgrading Visual Studio to version 15.6.7 and Service Fabric SDK to version 3.1.269 seems to work.

WPF Application designed in VS 2012 won't run on Windows 7 machine

I've designed a WPF C# application using Visual Studio 2012. The application, which is simple enough, runs fine on my Windows 8 machine using the ClickOnce deployment method. The datagrid displays the content from a SQL Server database and performs all of it's other functions just as I've designed it to, but when I attempt to install it on a Windows 7 machine it immediately crashes and I'm not sure why. The Windows 7 computer I'm trying to install the application on has .NET 4.5 running on it, but is there anything else that computer needs to have installed on it in order to run applications developed with VS 2012. This is my first attempt to install an application developed with VS 2012 on a Windows 7 machine, so I'm not sure if there's another step that I'm missing here. Any help you guys can provide would be greatly appreciated. Thank you.
The message you stated "The application has stopped working and that if Microsoft has a solution..." is an indicator of one of the following:
The Framework is disabled; though 4.5 is installed several root instances are built on the foundation which are apart of Framework 2.0. This particular Framework can cause issues for 3.0, 3.5, 4.0, and even 4.5.
The System.EnterpriseServices.dll is damaged in the Framework. Which needs to be connected back to the Global Assembly Cache (GAC).
And another common issue is the machine.config file log in the Framework Folder can be corrupt and needs to be replaced with a valid one.
There are others that can occur within the System Policy Folder as well, which may require you to use the .Net Cleanup Tool and reinstall the Framework. But before you do any troubleshooting you should go to the Event Viewer and get details of what is going on.
Try these steps first for me:
Windows Key + R
When the run prompt appears type: appwiz.cpl
Go to the left hand side: Turn Windows Features On or Off
Turn Framework 3.5 on if it isn't already; if it is already on go to Step 5.
Turn off the Framework; then reboot.
Once rebooted follow steps 1-4 again.
Now at this point I would suggest trying the application again. If it fails try this:
Open Start
Type 'cmd' in Search
Right Click and Run as an Administrator
Type %windir%\Microsoft.Net\Framework\v2.0.50727\ngen.exe update
Then type: sfc /scannow
The Native Regeneration tool will try to repair the Framework back to a factory state; the System-File-Checker will attempt to fix any errors indicated in Windows. If it can't it will say 'it found integrity violations'.
Those are the steps I would do for general support; but you really should try and locate an error message. As the Framework can become a huge ordeal to cleanup and fix. If you provide more information I will revise my response to help address it.
Hopefully that helps.

Error when launching MapPoint 2006/2011 from C# .NET application on Windows Server 2008

I am running into an issue when attempting to use MapPoint libraries within our C# .NET application from a published app on a Windows Server 2008 machine. When instantiating the MapPoint.MapClass, I get the error:
"Your registry settings for this application were not copied correctly. To correct these settings, run Setup again for this application from the location where you originally installed it."
I am able to launch MapPoint just fine by itself outside of the app, the error only comes up when running the published app. We have multiple servers that clients run the app on, and the server running Server 2003 is able to launch MapPoint just fine. In addition, XP and Win7 machines also work fine. We also have a Foxpro application that also utilizes MapPoint's API installed on the 2008 server, and it doesn't have any issues.
MapPoint is included as a COM reference in the VS project referring to "Microsoft MapPoint 13.0 Object Library (North America) 8.3".
Looking online, I found a bunch of possible solutions, but nothing worked. I have tried:
Uninstalling MapPoint 2006 entirely and manually removing all entries from the registry, then reinstalling
Doing the same as 1 but then installing the trial of MapPoint 2011, resulting in the exact same error message
Disabling UAC
Setting MapPoint.exe's compatibility mode to Server 2003 and XP
Please let me know if anyone has any other suggestions.
it does sound like something is partially installing / being blocked. Is this a user issue? Ie. Can you install for all users?
it doesn't explain the MP2006 issue, but I would avoid the trial version for API work - the trial nag screen can be a problem. Eg. If you start the app hidden, the user cannot always see the nag screen to dismiss it.
You say you are instantiating a Map class. What about the Application (or _Application) class: you must have one of these to create the Map.

WPF Error on Non-Development PC - XamlParse

I have an error very similar to the one addressed in this question. I am trying to deploy a small c#/Xaml utility on 6 work machines. 4 of the machines run the utility successfully and 2 do not. All machines are windows XP and have .Net frameworks 1-4 installed (my app is compiled against 4.0 and all machines have both client and extended redistributables installed).
On running the utility, I get the standard "... has encountered a problem and needs to close." On viewing the error report contents, the problem seems to occur in System.Windows.Markup.XamlParse.
I have run .Net 4.0 online installer in "repair" mode and still I get the same problem. I have tried all the suggestions from the post linked above:
The file is deployed alongside a DLL which is present and correct.
UI cultures are identical.
All computers are up to date from Microsoft Update.
The assembly does not contain any external resources which are referenced in XAML.
I don't really know where to start with debugging this one. Any suggestions?
I would suggest setting up remote debugging on the machines that are having the problem and then adding this to the startup code:
while (!System.Diagnostics.Debugger.IsAttached)
{
Thread.Sleep(100);
}

Issue with click-once deployment in MS Visual Studio C# 2008 Express Edition

I have an application which I have been deploying releases for over a year now. I have no issues building the application, but today, when I tried to publish it, I got the following error:
An error occurred while signing: Failed to sign bin\Release\app.publish\\setup.exe. SignToolError:
ISignedCode::Sign returned error: 0x80880253
The signer's certificate is not valid for signing.
SignToolError: An error occurred while attempting to sign: bin\Release\app.publish\\setup.exe
I checked an I have the .NET 3.5 Framework with SP1. I'm not sure why this suddenly stopped working, unless some certificate I had was only valid for one year, and it's been a year since I first installed VS 2008. However, I was able to publish as recently as last week, so it's got to be something that changed this week.
What certificate is it that may have expired, and how do I go about updating it with a new certificate?
This helped me out of the same situation:
http://may.be/renewcert/
It supposedly only happens with VS2005, but, like you, I had this happen with a .NET 3.5 SP1 project that I had been deploying from VS2008 for a year. Maybe it was using a cert that was created when/if I had VS2005 installed on this machine previously (don't remember).
The fix is a pain, because you have to download VC++ Express to compile the project, but in my case it was worth it to prevent having to ask 80 users to uninstall and reinstall the application. Now I'm good until 2014.
If you're in an Active Directory environment (most of us .NET developers are) then you should be able to request a Code Signing certificate from the domain controller using certmgr.msc.
If you don't have a trusted CA then I wouldn't bother signing the code at all.
You can find the signing settings in the project properties, one or two tabs above the Publish tab - that's where you can choose whether or not to sign the ClickOnce manifests also and/or the assembly itself. That's where your presently-expired certificate is likely referenced.

Categories

Resources