| | |
Web Service Access Problem
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 2.0 3.5 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamically edit fileuploader fill flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice youareanotmemberofthedebuggerusers





