Get Response From Remote Server?
Dec 17, 2010
I have made a desktop application in asp.net using c# that connecting with remote server.I am able to connect but how do i show that my login is successful or not. After that i want to retrieve data from the remote server...
try
{
string strId = UserId_TextBox.Text;
string strpasswrd = Password_TextBox.Text;
[Code]....
View 1 Replies
Similar Messages:
Feb 10, 2011
AJAX is under the same origin policy. Is there a clean way to use ajax to post data to a remote .aspx page and get response ?
View 2 Replies
Nov 27, 2010
I'm using an .ashx handler to retrieve an image file... It queries a local database, which retrieves the URL of an image which is hosted on Amazon S3.
But I can't use context.response.write(AmazonS3URL) because it returns the error '...is not a virtual path'.
Can context.response.write only return files that are on the local machine? Or is there another function to call remote files?
View 2 Replies
Feb 9, 2011
I'll preface this by stating I am a rank amateur when it comes to web dev.
I have a web appliance that provides XML data when issued a query string such as:
[URL]
I created a simple form that allows users to modify values of this query and have the appropriate XML returned. Here is that form:
<form id= "report" action="https://mysite.com/api/reporting.ns?" name="report">
Username: <input name="username"><br />
Password: <input type="password" name="password"><br />
<input type="hidden" name="generate_report" value="SupportSession">
Start Date: <input name="start_date">
<input type="hidden" name="duration" value="0">
<input type="hidden" name="limit" value="all">
<input type="submit" value="Show Report">
What I have not been able to accomplish is formatting that XML response so it looks pretty.
I have created an XSLT that formats the XML nicely and have used javascript to transform the XML using the XSLT like this:
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
else
{
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}
function displayResult()
{
xml=loadXMLDoc("Report.xml");
xsl=loadXMLDoc("Report.xsl");
// code for IE
if (window.ActiveXObject)
{
ex=xml.transformNode(xsl);
document.getElementById("content").innerHTML=ex;
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
xsltProcessor=new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
document.getElementById("content").appendChild(resultDocument);
}
}
Which works locally but I run up against the cross domain security problem as the web appliance is hardened and I am not able to place any code on it.
I have been searching this site and the web for a couple days looking for a method to accomplish this using other means [asp?] and have been largely unsuccessful. The main reason this is so is that I don't know asp so I'm not sure how to attack it.
I think creating the query string in a form, then loading the resulting xml response from the web appliance to a string and applying the XSLT that resides on the server to it might be an option but haven't been able to make it work; again because I'm not really sure what I'm doing.
Here is my XSLT:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<div class="contentBox"> -->
[Code].....
Further information:
I found a way in asp to retrieve remote xml that works for URL's like http://site.com/file.xml but doesnt work for my URL. Maybe because it is a query? I've looked at way to encode/encapsulate my URL but haven't found anything that works.
[URL]
View 1 Replies
Apr 15, 2010
How to insert data from local SQL server to remote SQL server (without using linked server) like below?
insert * into [remote server].[northwind].orders
from [local server].[northwind].orders
View 4 Replies
Mar 13, 2010
I have created web pages using VS Web Developer that use a local Developer Edition of SQL server database on my PC with LINQ to SQL. When I deploy my website to a remote web host SQL server, I need for my web pages to be able to use the remote database instead of the local database. So, how do I get the Server Explorer to connect with a remote SQL Server database?
View 6 Replies
Jan 17, 2011
I have to write a application which connects to remote server(windows 2003 server, open SQL Management studio in that server and enter a specific SQL Server address and access a stored procedure, change some values and execute the stored procedure.)
I have to write this application using C#.Net , Could anybody point me in right direction, Where do I start?
View 6 Replies
May 27, 2010
I tried this code by inputting the ftp address as ftp//: and the correct username and password and I get the following error
"Unable to connect to the remote server" on line :
FtpWebResponse Response = (FtpWebResponse)Request.GetResponse();I tired this on my ftp server provided by a hosting service and an anonymous ftp located at 193.166.120.5 ?
Note: I was able to connect to both of these ftp through filezilla, via a webbrowser, and through windows command line.
View 1 Replies
May 20, 2010
I need to insert a record in table which is in remote server....I am using two connection strings for local and remote....both the servers are in same workgroup only...so am able to connect the both.The problem is am filling data of local table in on dataset1 and remote server table data in another dataset dataset2..Now whil inserting a record local an error occured like "This row already belongs to another table" after googlingI found like this like "Dataset.importrow()" instead of "dataset.add()" method...then there is no errors but the inserted record is not inserting in remote server database...
View 5 Replies
Aug 4, 2010
I am using Sql Server 2008 to connect to a Remote Server. Everything was working fine for the last couple of months, and i was successfully connecting to the remote server. Today it suddenly stopped connecting to the remote server. note that i did not alter any configuration settings. Did my isp block Sql Server. My ISP is using ISA SERVER? The error details are:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider) I am using Microsoft Firewall Client For ISA Server for opening ports. But today nothing is working.
View 1 Replies
Jan 25, 2011
I have deployed my site in Win 2003 server. In this, it copies file from Another server and copies it in local. It is working with my local computer, but not in the server i have deployed. I hope access credentials may be the first reason. But are there any other reasons for this.
View 1 Replies
Dec 16, 2010
i want to take the DB Backup from theremote server to the local system..
i'm using sql server2008 enterprise edition and the remote server is sql server2008 express. how to do it..
View 3 Replies
Jan 6, 2011
I have problem accessing an SQL server DB on a remote server.Actually, I had no problem with creating a connection string to it using the Visual Web Deveoper 2005 Express Edition GUI, however, I have problem connecting to it through the code.This is the connection string created by the GUI, and connection test on the connection wizzard GUI just works fine.
[code]...
View 3 Replies
Aug 9, 2010
I have a problem, my database reside on a separate server and my online website need to access that server to get some data. The server is in my office and connected with Internet.
I have configure the SQL server 2005 on the server to allow remote connections. Enabled TCP/IP and named pipeline. The port is 1433.
I give following connectionstrings.
1. <add name="DatabaseConnectionString" connectionString="Data Source=nt1111;Initial Catalog=testdatabase;Persist Security Info=True;User ID=test;Password=***" providerName="System.Data.SqlClient"/>
2. <add name="DatabaseConnectionString" connectionString="Data Source=nt1111;Initial Catalog=testdatabase; User ID=test;Password= "***"; User Instance=False" providerName="System.Data.SqlClient" />
3. The same as 2 but with IP <add name="DatabaseConnectionString" connectionString="Data Source=999.99.9.99;Initial Catalog=testdatabase; User ID=test;Password= "***"; User Instance=False" providerName="System.Data.SqlClient" />
View 13 Replies
Dec 2, 2010
I have a db on my development server (local machine) and want to restore it to the production server online, using a script or tool.
I'm not sure how to write the code so it accesses my local server for the back up, and then restores that backup to the production server.
View 1 Replies
Mar 22, 2011
I just switched to a new hosting company and I need to copy the existing database to the new server. I've created a .bak file of the database to restore it on the new server however the interface has facility for restoring database and can not restore remotely through sql server management studio. I could import data from the original database to the new one but that doesn't copy the primary keys? The hosting company said they will restore it for me but they're taking to long and I've got 5 other sites I need to do.
View 5 Replies
Sep 20, 2010
I am getting Error in this code. I mention my ERROR in BOLD Letter in my Coding.. And i show u the Connectionstring Too.
BUt this code is working Perfectly in My local "Connectionstring"
Conn = New SqlConnection("Data Source=xxx.xxx.xxx.xx;Initial Catalog=xxxxxxxxxxxxx;Persist Security Info=True;User ID=xxxxxxxxxx;pwd=xxxxxxxx;MultipleActiveResultSets=True")
If (Conn.State = ConnectionState.Closed) Then
Conn.Open()
End If
ErrMsg = ""
[Code].....
View 9 Replies
Sep 29, 2010
I want to Access remote server( ie., want to access online server not local server) in my Application.. I change Settings in SQL surface Area Configuration---> Remote Connection ( checked the Local and Remote Connection ) Then while running the application it showing the following error.(I make off the firewall also) An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
View 1 Replies
Jan 25, 2011
I have 2 servers. the database server (DB1) which has sqlserver installed and the application server (WEB1) which has my web application. They are both on the same network and both have the same administrator login.
My web application on the application server needs to access the database on the database server. sqlserver is set to mixed mode in security. i created a random sqlserver user login that can only access my database and set it as the db owner. I use the username and password for this in my connection string. when i run my web application i can read information but i cant write to the database. My app is using windows thentication. I have set my NT AUTHORITYNETWORK SERVICE account to db_owner for my database as well... grabbing at straws!
Question 1: When my application talks to sqlserver does it use the administrator login or the NT AUTHORITYNETWORK SERVICE account which i got from using windowsidentity.getcurrent()?
Question 2: If I use ASP.Net impersonation, what does this do exactly? Because if i run the ndowsIdentity.GetCurrent() i get the username that i specified. How does this tie in with my connection string?
Question 3: If I dont use impersonation what and how do i have to configure sqlserver to accept my insert/update requests? Do i need to work with the NT AUTHORITYNETWORK SERVICE? or can i just use my user login? What do i need to add or remove from my connection string? (see below).
[code]....
View 7 Replies
Sep 9, 2010
How to modify the server value of response header through code behind using asp.net 2.0 with IIS6.0 server.
I have tried Response.Headers.Set("XYZ","ABC");
But it displays integrated pipeline error....
View 1 Replies
Feb 25, 2010
I recently purchased a new domain for the sole purpose of hosting all the static content on a separate server and delegate CPU intensive operation like thumbnail creation on a different pool. Now I would like to do some operations on images uploaded to that remote server : creating thumbnails or updating the image if we need to. Should I download the images to my server, modify them there and then upload them back to the remote server or should I try to create web-services to manipulate the images?One of my solution was to provide an interface to upload and manipulate the images in the new domain, by leaving the old domain when it comes time to work on images, but I find it kind of awkward.I would like to keep the new domain cookie free. How would that affect my ability to restrict any random user to use the web-services if I decide to go that way?
View 1 Replies
Jan 27, 2010
I have an ASP.NET MVC site that is running into some conditions that it is pegging the processor on the iss boxes it's running on. I don't have access to these servers (it's a farm of about 5 iis6 boxes behind a netscalar). I am doing some logging to a sql database, but the problem is that when the cpu pegs my database starts timing out. The iis servers are hosted in house, but I can't get access to them.
And to make things ever more complicated, I can't reproduce any of these issues in my qa environment (which I don't have access to either). QA is setup to similarly to our prod environment, but it runs on a single box that isn't behind a netscalar.
View 3 Replies
Feb 28, 2011
how to connect to remote database(SQL server)using c#
View 2 Replies
Nov 1, 2010
I want to display image in image control but the image is on the different server. My application is Intranet based application. My image is stored on "C:ProjectImagesimg123.jpg" and my server name is "MyServer". Can any one send me the code to display image in to the image control?
View 1 Replies
Nov 12, 2010
i just deployed my web site to the remote server. I noticed that the menu (navigation) bar is doesn't display as on my local server. I am using visual studio 2010.The stylesheet was also deployed to my remote server. I am using the new asp.net 4 already designed navigation. It works find on my local machine but not on the remote machine.
View 2 Replies