Click here to Skip to main content
15,905,508 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerNeed some clarification Pin
David Mujica15-Apr-11 3:17
David Mujica15-Apr-11 3:17 
GeneralRe: Need some clarification Pin
Not Active15-Apr-11 6:51
mentorNot Active15-Apr-11 6:51 
Questioncheck box in datalist Pin
hurera111114-Apr-11 20:29
hurera111114-Apr-11 20:29 
AnswerRe: check box in datalist Pin
m@dhu15-Apr-11 2:49
m@dhu15-Apr-11 2:49 
GeneralRe: check box in datalist [modified] Pin
hurera111117-Apr-11 18:01
hurera111117-Apr-11 18:01 
GeneralRe: check box in datalist Pin
m@dhu20-Apr-11 23:43
m@dhu20-Apr-11 23:43 
GeneralRe: check box in datalist Pin
Prasanta_Prince21-Apr-11 2:44
Prasanta_Prince21-Apr-11 2:44 
QuestionHelp in ASP.NET web service Pin
akosidandan14-Apr-11 19:49
akosidandan14-Apr-11 19:49 
Hello experts,

I would like to ask again if how will I'm going to edit my web services because it seems that it's only working on my local machine.
I tried to upload my web service and the 2 database(ms access 2003 and sql server 2005 express) to a free asp.net hosting site but I got and error that I cant access the database. I detach my sql server 2005 express to my sqlSERVER Management studio before I upload it.

Below is my sample code to my asmx file.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

//sql client import

using System.Data.SqlClient;
using System.Data;

using System.Data.OleDb;

namespace WebService1
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    //[WebService(Namespace = "http://tempuri.org/")]
    //[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    //[System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {

       
        [WebMethod]
        public DataTable getData()
        {
            OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\MemberSites\\MemberSites_AspSpider_Info\\akosiDAN\\database\\Database1.mdb");
            DataSet ds = new DataSet();
            DataTable dt = new DataTable();
            ds.Tables.Add(dt);

            OleDbDataAdapter da = new OleDbDataAdapter ("Select * from phonebooktable",con);
            da.Fill (dt);

            return dt;
        }

        [WebMethod]
        public DataTable getData()
        {
            SqlConnection con = new SqlConnection("server= DANDAN-PC\\SQLEXPRESS;uid=myID;pwd=myPASSWORD;database=phonebookdatabase");
            DataSet ds = new DataSet();
            DataTable dt = new DataTable();
            ds.Tables.Add(dt);

            SqlDataAdapter da = new SqlDataAdapter("Select * from phonebooktable", con);

            da.Fill(dt);

            return dt;
        }
    }
}


Any help are kindly appreciated.

Thanks,
DAN
AnswerRe: Help in ASP.NET web service Pin
Pravin Patil, Mumbai15-Apr-11 0:40
Pravin Patil, Mumbai15-Apr-11 0:40 
GeneralRe: Help in ASP.NET web service Pin
akosidandan15-Apr-11 0:59
akosidandan15-Apr-11 0:59 
GeneralRe: Help in ASP.NET web service Pin
akosidandan15-Apr-11 17:31
akosidandan15-Apr-11 17:31 
AnswerRe: Help in ASP.NET web service Pin
Prasanta_Prince15-Apr-11 2:37
Prasanta_Prince15-Apr-11 2:37 
GeneralRe: Help in ASP.NET web service Pin
akosidandan15-Apr-11 17:31
akosidandan15-Apr-11 17:31 
QuestionPage Life Cycle Pin
CodingLover14-Apr-11 18:18
CodingLover14-Apr-11 18:18 
AnswerRe: Page Life Cycle Pin
Ravi Sant14-Apr-11 23:36
Ravi Sant14-Apr-11 23:36 
GeneralRe: Page Life Cycle Pin
gavindon15-Apr-11 3:26
gavindon15-Apr-11 3:26 
AnswerRe: Page Life Cycle Pin
Pravin Patil, Mumbai15-Apr-11 0:38
Pravin Patil, Mumbai15-Apr-11 0:38 
GeneralRe: Page Life Cycle Pin
Prasanta_Prince15-Apr-11 3:02
Prasanta_Prince15-Apr-11 3:02 
AnswerRe: Page Life Cycle Pin
TweakBird15-Apr-11 18:02
TweakBird15-Apr-11 18:02 
QuestionASP .NET 4.0 (C#) - Access 2007 Table Relationships and DataGrid Pin
Matt U.14-Apr-11 11:06
Matt U.14-Apr-11 11:06 
Questiontop% filter in ssrs report Pin
gavindon14-Apr-11 9:13
gavindon14-Apr-11 9:13 
QuestionCounting nodes in treeview Pin
sarang_k13-Apr-11 23:48
sarang_k13-Apr-11 23:48 
AnswerRe: Counting nodes in treeview [modified] Pin
Pravin Patil, Mumbai15-Apr-11 0:42
Pravin Patil, Mumbai15-Apr-11 0:42 
QuestionISPostBack return wrongly Pin
anishkannan13-Apr-11 22:54
anishkannan13-Apr-11 22:54 
AnswerRe: ISPostBack return wrongly Pin
Jassim Makki13-Apr-11 23:25
Jassim Makki13-Apr-11 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.