473,387 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Webservice ASMX

hey peaple i whas looking on the internet for a solution but i cudent find any so i try it here

its about my ASMX file wich contains this rule

Expand|Select|Wrap|Line Numbers
  1. <%@ WebService Language="c#" Codebehind="DataConnection.asmx.cs" Class="DotNet.dbConnection" %> 
the error is : Could not create type 'DataConnection

the file dataconnection.asmx.cs is located at the root in the folder wsdataconnection. I tryd a lot my self and i know that my asp is configurated at 2.0, and also i tryd to do it like this but no results

Expand|Select|Wrap|Line Numbers
  1. <%@ WebService Language="c#" Codebehind="wsdataconnection\DataConnection.asmx.cs" Class="DotNet.dbConnection" %> 
hope somone can help me and tanks for the reaction

Tanx Guys
Sep 30 '08 #1
13 3719
DrBunchman
979 Expert 512MB
Hi asmx126453,

I moved your question to the .NET Forum where it belongs - one of our many experts in here should be able to help you :-)

Dr B
Sep 30 '08 #2
Oke Tanx for that i am srry i posted it at the wrong place
Sep 30 '08 #3
Curtis Rutland
3,256 Expert 2GB
What is the namespace you use in your .cs file?
Sep 30 '08 #4
the namespace from my DataConnection.asmx.cs file is DotNet
Sep 30 '08 #5
Curtis Rutland
3,256 Expert 2GB
OK, please post the code from the .cs file.
Sep 30 '08 #6
No Problem here is the beginning of the code i am not gonne put all in it its 2 mutch

( DataConnection.asmx.cs )
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Diagnostics;
  6. using System.Web;
  7. using System.Web.Services;
  8. using System.Data.SqlClient;
  9. using System.Windows.Forms;
  10. using Microsoft.Data.Odbc;
  11. using System.IO;
  12.  
  13. namespace DotNet
  14. {
  15.     /// <summary>
  16.     /// Web services voor gebruik in het klantinformatiesysteem.
  17.     /// </summary>
  18.     public class dbConnection : System.Web.Services.WebService
  19.     {
  20.         public dbConnection()
  21.         {
  22.             InitializeComponent();
  23.         }
  24.         private System.Data.SqlClient.SqlConnection dbConn;
  25.         private Microsoft.Data.Odbc.OdbcConnection OdbcConn;
  26. .
  27. .
  28. .
  29.  
the rest of the code are all methods to get information out a database

( DataConnection.asmx )

Expand|Select|Wrap|Line Numbers
  1. <%@ WebService Language="c#" Codebehind="DataConnection.asmx.cs" Class="DotNet.dbConnection" %>
And this is the other file i hope you can see the solution
Sep 30 '08 #7
Curtis Rutland
3,256 Expert 2GB
Try this link.

Hopefully this will help.
Sep 30 '08 #8
Nop still cant get it 2 run

the weird thing is that i can look at the properties of the page but i have Web File Properties there and i cant choose my build action lookt at it in VS 2005 and Visual Web Developer 2008 both nothing

and than the last thing is that i dont have a folder Web Service Extensions at IIS but i do have IIS installed ???

cud it be that it is not running becase the aplication whas build in Visual Studio 7 and i converted it to 2005 or in VWD 2008

Tanx for all the help hope somone else may has an idee
Sep 30 '08 #9
Curtis Rutland
3,256 Expert 2GB
cud it be that it is not running becase the aplication whas build in Visual Studio 7 and i converted it to 2005 or in VWD 2008
That could be it. Try to build a new service in 2005 or 2008 and copy the methods and see if that works.

Edit for clarification:
I've had nothing but problems upconverting projects. Every time I've tried, I've had to fix something or other.

One thing you might want to check:
Make sure that the service is being compiled as a Framework 2.0 app. I don't have VS in front of me, so I can't be sure, but there should be some setting in the Project properties from the Project menu that will let you set the target framework.
Sep 30 '08 #10
Tanx for the help

I will wait untill friday for chekcing the rest becase than i can ask help of a teacher.

The Framework my project is using is 3.5 i puit it on 2.0 but it dident make any difrence. But becase the application isent compleet yet and still needs some more functions i can work on that. So if you whanne now if i found a solutiuon just check back on friday. and i will repley a post hopefully with solution.

But Tanx for are all your help so far
Oct 1 '08 #11
Hey Guys

I think i got it Fixed it looks like it that my dataconnection.asmx.cs needed to be in the App_Code folder becase otherwie it wont work ???

but i got it running on some diferent errors now so if you whant to make a webservice make sure the file you link to is in the App_Code folder that workd for me.
Oct 1 '08 #12
Hey Guys somethings wrong becase i thougt i fixed it but now i solved all the other errors and than i again get the problem that here abouve so probly it dident fix the error just by putting the file in my App_Code folder

if somone still has a solution i would love 2 here tnx
here is the code in page i am ussing now

Expand|Select|Wrap|Line Numbers
  1. <%@ WebService Language="C#" CodeBehind="~/App_Code/DataConnection.asmx.cs" Class="dbConnection" %> 
Oct 6 '08 #13
srry i forgat 2 add the namescpace now i just saw it en when i tryd it workd srry
Oct 6 '08 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: author | last post by:
Newbie Q... When I hit the "ws.asmx" in a browser, I get "Parser Error Message: Could not create type 'Service1'" ?? If I use the file "ws_ok.asmx" (without codebehind, but same code), I get...
4
by: Tim Gallivan | last post by:
Hello group, I'm trying to develop a proof of concept webservice which asynchronously calls a function in a DLL. The function raises an event when it is finished, and works when used as part of...
8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
3
by: ad | last post by:
I add a WebService (*.asmx) in a WebApplication. My web application use Form authentication. But when I open the .asmx in IE, it result in an error: No htmlform ! can't set ...
2
by: rn5a | last post by:
I have created the following WebService named NConnect.asmx using which I want an ASPX page to first authenticate a user & after successful user validation, the ASPX page should display a few...
2
by: Big George | last post by:
Hello Experts ! I'm using: VS.NET 2003 I have a webservice1.Service1. I have installed it on IIS. No problem. I can access it through: http://localhost/WebService1/Service1.asmx or...
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
5
by: =?Utf-8?B?a3Jpcw==?= | last post by:
I created a simple webservice .asmx on Visual Studio 2005. As I plan to deploy it to Sharepoint Portal 2003, I copied asmx to \web server extensions\60\ISAPI directory of the server, where all...
4
by: =?Utf-8?B?QmlsbEF0V29yaw==?= | last post by:
Hi, We recently converted a 1.1 project to 2.0 and this included a webservice which accepted XML for one of the parameters. Since converting to 2.0 I am getting the following message: --- A...
8
by: cj | last post by:
I've seen examples of web services written with <%@ WebService Language ="Vb" Class=".... at the top. Is it not used in VB 2008?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.