troubleshooting Question

How to use web.config, asmx and default.aspx

Avatar of MikeCombe
MikeCombeFlag for United States of America asked on
WCFASP.NET
6 Comments1 Solution1097 ViewsLast Modified:
I am having a problem getting my DEFAULT.ASPX file to get the connection in the WEB.CONFIG file, which is calling on a webservice asmx located on a website server. Below are my settings in the web.config file and the default.aspx file.

Notes:
1. I hand coded these files, so there are no other files in play.
2. When I use Visual Studio 2005, there are lots of other files. However, when I copy the files to my website server, I encounter other issues. I cannot use the 'publish' feature in VS2005. I am just trying to run a test to see how the ASMX file works. In this case, the ASMX file is returning a dataset, which the default.aspx file will display to the user.

Questions:
1. What am I doing wrong?
2. Does the asmx file, or something else need to be compiled before I upload it to my server?
3. Where is the location of the web.config file? Can it be in the sub-folder where default.aspx is or does it need to be in the website root folder?

[web.config]
<configuration>
<appSettings>
<add key="ABC.Test" value="http://www.mywebsitee.com//WebServices/Test.asmx"/>
</appSettings>

[default.aspx]
Sub gv_Clients_Load()
    Dim ws As New ABC.Test      <---- Error here, see msg below
    gv_Clients.DataSource = ws.GetClients
    gv_Clients.DataBind()
End Sub

[default.aspx      Error Message]
Compiler Error Message: BC30002: Type 'ABC.Test' is not defined.


ASKER CERTIFIED SOLUTION
strickdd

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros