I am new to web services.
I was just following a tutorial and created a web service. The next step was to create a proxy by entering wsdl followed by path to esdl contract. It was supposed to create a service1.cs file however my system created service.cs file which was similar to except on the tutorial.
The next step is to create a console tester application. I added the service.cs file to my console project but it cannot compile. I'm getting the following error:
Error 1
The type or namespace name 'Services'
does not exist in the namespace 'System.Web'
(are you missing an assembly reference?)
C:\.....\tws\Service.cs 4 18 tws
Please help.
Did you look in the project references?
System.Web.Services is NOT in System.Web but in a different separate assembly.
See if there is a reference to :
System.Web.Services
if not add a reference to:
System.Web.Services.dll
In your project System.Web.Services reference is missing to add this follow below
click on
References> Add References> Assemblies > Framework >System.Web.Services
Either scroll the list to find this or type "System.Web.Services" in search box
select System.Web.Services and add it .
Related
I have read all the similar posts here on stackoverflow and I'm still unable to resolve the issue.
These are my steps in Visual Studio 2015.
I create new project named "208" choosing Web -> ASP NET Web application (Net Framework)-> Empty
I right click on my project and choose Add -> New Item -> Web form
Just to test I create a new project in the same solution, a Class library solution and name it "MyClasses." Then I add a public class "Class1" with one public property.
I right click on the project "208" and add a reference to "MyClasses."
I add "using MyClasses;"
I build the project locally and it works fine.
I publish using FTP to my host and I get "CS0246: The type or namespace name 'MyClasses' could not be found..."
Both projects, "208" and "MyClasses" are built against Net Framework 4.6.1
The host has Net Framework 4.6.1
When published to the host, I can open the "bin" folder and I see the .dll file "MyClasses.dll" there.
Any suggestions are greatly appreciated.
The dll file is there when I publish:
Using added:
And the error (CS0246: The type or namespace name 'MyClasses' could not be found (are you missing a using directive or an assembly reference?):
I have the job of getting a legacy project working again. This project was done many years ago using Silverlight and C# Class Library's.
The error I am getting is to do with a namespace inside the project file called Silverlight.Business:
Code
using Tcx = global::MapTools.Xml;
Error:
The type or namespace name "MapTools" could not be found in the global namespace (are you missing an assembly reference?)
MapTools is a C# Class Library and Silverlight.Business is a Silverlight Library. Due to this I can't add a reference to MapTools inside the Silverlight project file.
The silverlight project does have a WCF RIA Service's Link but that does not connect to anything.
I am now wondering how the person that wrote the code has managed to call that namespace? I have tried researching how to add the MapTools.dll to the Global namespace but have not found anything.
Anyone have any ideas?
To do that there should be an some tool been used .
We had used in our projects a Portable library which allowed us to communicate through cross type of projects , below is the link :
https://msdn.microsoft.com/library/gg597391(v=vs.100).aspx
I'm using nopcommerce.
I want to get Stock qty from external data base.
So I add a another project inside Presentation folder and I set the database connection string inside the web config file.
The I try to use new project function inside the Nop.Admin project.
For that I write
using ExternalDB;
But there is error-
The type or namespace name 'ExternalDB' could not be found (are you missing a using directive or an assembly reference?)
Do you have any idea on why it can't find the namespace? How do I add a external project with a external DB inside the nopcommerce?
There's no concept of one project inside another project. You can have a project inside a solution in Visual Studio, but that's not the same thing.
You should look at which namespace the ExternalDB type is in, and just have a using directive for that namespace.
Is "ExternalDB" a project name or a type?
I guess you miss to add a reference associated with "ExternalDB" to your Admin project.
I have a c# project with a reference that cannot be found when checking in to TFS. The project runs fine when i debug.
It its in my services project the problem is located. I have a reference to lets say ProjectSec. And i have a wewbservice reference to Projectservice.
The webservice uses the ProjectSecurity.Security namespace that is located in the ProcectSec assembly.
When i check in my files i get the following error:
The type or namespace name 'ProjectSecurity' could not be found (are you missing a using directive or an assembly reference?)
Could not resolve this reference. Could not locate the assembly "ProjectSec". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
The ProjectSec.dll is located in the lib folder and its there. There is no error when i try to use it elsewhere in my project.
This may not be a perfect explanation but does anyone know what i could try?
I have removed the reference and added it over again, but no luck.
A common pitfall with TFS-build is to have in Source Control something, for example, like this:
$/Sources/Webservice
$/Libs/ProjectSecurity
And then, in the build definition that is validating your checkin, to have only
Active | $/Sources/Webservice | $(SourceDir)
as workspace mappings.(You can access this by right-clicking on the build definition in TeamExplorer, select "Edit Build Definition.." & go to Tab "Workspace")
I have two projects in my solution: MyApp.Domain and MyApp.WebService. MyApp.WebService is a WCF service library.
I want to use some utility functions from MyApp.Domain. So in MyApp.WebService, I added a reference to MyApp.Domain.
Intellisense picked it up just fine, it recognized the function I need to call. But when I build the solution, I get this error:
The type or namespace name 'Domain' does not exist in the namespace 'MyApp' (are you missing an assembly reference?)
at using MyApp.Domain.Utility;
What's going wrong here?
Make sure both are using the same profile... if one is using the client profile you could be getting this error.... also if the referenced assembly has some references in it to other assemblies you may need to include them in the project as well. If that doesn't get it make sure both have the same setting for 32 vs 64 bit...
GL
Remove WCF Service project from Solution and build solution. After building solution, add WCF project again. Issue will be resolved.