| | |
Web Service Access Problem
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 3
Reputation:
Solved Threads: 0
Note : -- Actually the IP address of my system is 192.168.1.253. The sql server is on the system 192.168.1.12. On my system the program is working properly. When I publish tht web service in inetpub, I can access also on machine 192.168.1.144 by the URL "http://192.168.1.253/MyWebServices/Service.asmx". But the same default.aspx page on 192.168.1.144 can not access tht web service. It provides an error msg described above. will u plz help me............
The code in my web service is as follows:-----
The code in the default.aspx page is as follows : ---
The code in web.config is: --
The error I got is :--
The request failed with HTTP status 405: Method not allowed.
The code in my web service is as follows:-----
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data.SqlClient
Imports System.Data
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class ServiceInherits System.Web.Services.WebService
<WebMethod()> _
Public Sub InsertData(ByVal cmd As String, ByVal con As String)
Dim dbConnection As New SqlConnection(con)
dbConnection.Open()
Dim Command As New SqlCommand(cmd, dbConnection)
Command.ExecuteNonQuery()
dbConnection.Close()
dbConnection = Nothing
End Sub
<WebMethod()> _
Public Function ReturnData(ByVal cmd As String, ByVal con As String) As DataSet
Dim dbConnection As New SqlConnection(con)
Dim objCommand As New SqlDataAdapter(cmd, dbConnection)Dim ds As New DataSet
objCommand.Fill(ds)
dbConnection.Close()
dbConnection = Nothing
Return ds
End Function
End ClassProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim trn As New Transfer.Service()
Dim strData As String = "Select * from Test_Dup"
Dim strCon As String = "server=192.168.1.12;uid=sa;pwddatabase=Master;"
Dim ds As New DataSet
ds = trn.ReturnData(strData, strCon)
GridView1.DataSource = ds
GridView1.DataBind()
End Sub<appSettings>
<add key="Transfer.Service" value="http://192.168.1.253/MyWebServices/Service.asmx;"/>
</appSettings>The request failed with HTTP status 405: Method not allowed.
Last edited by Tekmaven; Aug 12th, 2008 at 5:55 am. Reason: Code tags
![]() |
Similar Threads
- DNS Error for Secure Web Sites only (Web Browsers)
- A few problems i've been having - with msn/internet explorer etc (Viruses, Spyware and other Nasties)
- Good advice when choosing an SEO service.... (Search Engine Optimization)
- Cannot access hotmail on IE or MSN explorer (Web Browsers)
- Page cannot be displayed (Web Browsers)
- trouble enabling cookies on IE & Mozilla (Windows NT / 2000 / XP)
- cannot find server - Microsoft Internet Explorer afterdownloading Win Service pack 2 (Networking Hardware Configuration)
- Spyware Problem (Viruses, Spyware and other Nasties)
- IE Hijacked by res://jxusk.dll/index.html#37049 and web address problem (Viruses, Spyware and other Nasties)
- How to maintain session for Web Services Object? (VB.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Put the value in File upload control
- Next Thread: Trying to consume Coldfusion Web Service using VB.NET
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





