C# - Uploading/Pushing Data To A Website?
Jan 22, 2010
I need to let a company push information up to my site.The best way to explain what I am talking about is to explain how it is currently done with their previous website:This company uploads a CSV file to an FTP set up by the website. The website then processes the CSV file and puts it into an SQL database so that it can be used by the website.In this case, I am the website and I am working with the company. Both sides are willing to change what they do. So my question is...
What is the best way to accept batch information like this? Is there a more automated way that doesn't involve FTP? In the future I may have a lot of companies wanting to do this, and I'd hate to have to setup accounts for each one.The project is C# ASP.NET MSSQL
View 2 Replies
Similar Messages:
Jan 15, 2011
When uploading a new DLL for a large web application (dll is around 1mb) IIS throws an error because the DLL is 'in-use', meaning the website is down while the DLL is being uploaded. Is there a way to stop this behaviour?
Also, although I am using Web Applications, not Web Sites, whenever I upload a new DLL it still takes a while for IIS to restart after a fresh upload. I thought this wait was generally only for websites as they need to be compiled by IIS, not Web Applications?
View 1 Replies
Jan 28, 2011
I'm currently developing a web application where everything works fine in the visual studio web server. It authenticates the user, access the database, writes to it, etc.
After I wrestled yesterday to publish it to my local iis, a subject I admit I have little to no experience of doing, suddenly the membership of the website started to not authenticate the users.
At first I suspected maybe the app wasn't accessing SQLServer, or that the data with the users I had in the asp.net membership database was erased when I uploaded the website.
So I stopped iis, i attached the db file to my local sql server, and I can see that all the users are there just like I uploaded them. I also can see the website can access another database with micellaneous contents just fine.
The loging controls don't tell me there's any problem either, they just show a message telling the user that the login attempt wasn't successful.
So, here's what I remember I did to make the app work as it wasn't even doing that when I first uploaded it.
I used the asp.net_regiis tool to copy website scripts to the website.
aspnet_regiis -sn <path>
then I deleted the website, uploaded again from VS. this time it shows in the browser but it doesn't authenticate the users.
The application isn't precompiled, I just uploaded it.
View 6 Replies
Nov 15, 2010
I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running.
What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If that tool happened to get down into the code to show it, that would also be nice. If not, i'm happy just knowing which site is causing the issue.
I've already tried using ANTS. However, with ANTS you need to know which site it is, and then have it running and waiting on said CPU-crashing web app. Not perfectly ideal.
View 4 Replies
Jul 22, 2010
Trying to push some coordinates, as well as some stuff specified in a form by the user, to an an array called "seatsArray". Here's my code:
<div>
<img onLoad="shiftzoom.add(this,{showcoords:true,relativecoords:true,zoom:100});" id="image" src="plan1.bmp" width="1024" height="768">
</div>
<script type="text/javascript">
var seatsArray = [];
</script>
<br><input id="backnave" type="radio" name="area" value="backnave" /> Back Nave<br>
<input id="frontnave" type="radio" name="area" value="frontnave" /> Front nave<br>
<input id="middlenave" type="radio" name="area" value="middlenave" /> Middle nave<br>
<input type="radio" id="standardseat" name="seat" /><label for="radio1">Standard</label><br>
<input type="radio" id="wheelchairseat" name="seat" checked="checked" /><label for="radio2">Wheelchair</label><br>
<form id="my_form" action="savetext.aspx" method="post" onsubmit="return prepare()">
<input type="text" id="file_name" name="file_name" rows="1" cols="20" />
<input type="hidden" name="seatsArray" />
<input type="submit" value="Save" />
</form>
<form id="my_form" action="savetext.aspx" method="post" onsubmit="return prepare()">
<input type="text" id="file_name" name="file_name" rows="1" cols="20" />
<input type="hidden" name="seatsArray" />
<input type="submit" value="Save" />
</form>
<script type="text/javascript">
function prepare();
{
document.getElementById('seatsArray').value = seatsArray.join();
return true;
}
</script>
<script type="text/javascript">
var coordinates = document.getElementById("image");
coordinates.onclick = function(e) {
e = e || window.event;
if (e && e.pageX && e.pageX) {
e.posX = e.pageX;
e.posY = e.pageY;
} else if (e && e.clientX && e.clientY) {
var scr = {x:0,y:0},
object = e.srcElement || e.target;
//legendary get scrolled
for (;object.parentNode;object = object.parentNode) {
scr['x'] += object.scrollLeft;
scr['y'] += object.scrollTop;
}
e.posX = e.clientX + scr.x;
e.posY = e.clientY + scr.y;
}
var desc = "";
if(document.getElementByID("backnave").checked) {
desc = "BN, "+desc;
} else if(document.getElementByID("middlenave").checked) {
desc = "MN, "+desc;
} else if(document.getElementByID("frontnave").checked) {
desc = "FN, "+desc;
}
if(document.getElementById('wheelchairseat').checked) {
//Wheelchair seat is checked
desc = "Wheelchair "+desc;
}
seatsArray.push(desc + e.posX, e.posY);
}
</script>
But simply nothing is getting pushed to the array. I can tell this as I am using the following ASP.NET to write the array to a text file:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
string path = Server.MapPath(".")+"/"+Request.Form["file_name"] + ".txt";
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine(Request.Form["seatsArray"]);
sw.WriteLine("");
}
}
using (StreamReader sr = File.OpenText(path))
{
string s = "";
while ((s = sr.ReadLine()) != null)
{
Response.Write(s);
}
}
}
</script>
The name of the text file is correct according to what the user put in the form "file_name". As you can see I made seatsArray a hidden form object so thats what the ASP.NET is trying to call.
Is something in the javascript in the wrong order or something? Because I just can't get it to fill up that text file.
View 2 Replies
Jul 4, 2010
I have 2 asp.net sites (site1 and site2). site1 have a directory inside in called images. In images directory there are images. I need to upload files using site2 aspx page, but need to upload them to images folder of site1. how can I do that?
View 1 Replies
Sep 16, 2010
I have 2 tables t1 and t2. In t1 I have 4 columns from that I want to insert only 2 columns to another table t2. I only want to send data which is in the form of IP address like (123.123.123.123). After eliminating nulls and other data.
View 7 Replies
Aug 23, 2010
I'm making an application with server sided variables that change every second. Every second those new variable need to be shown at all the clients that have the webpage open. Now most people told me to go with comet because I need to push/pull the data every second, now I've got a few questions: What would be a better solution looking at the fact that I need the new data EVERY SECOND, pulling from the client or pushing with the server?
Also the item ID's that are on the server side (with the variable's that ID got) can change and when the client refreshes the page he needs to get the oldest (and living) ID's. This would mean that my jquery/javascript on the client side must know which ID's he got on the page, what is best way to do this? Last thing is that I can't find a good (not to expensive) comet library/api for asp.net (C#). Anyone ever used a comet library with good results? We're looking at a site that should be able to have 2000 comet connections at every moment.
View 3 Replies
Mar 11, 2010
I hv a query regarding publishing the website. I use aspnet2.0 and for uploading we use filezilla.
Whenever I make any changes to my website (either in aspx or aspx.cs page), I need to upload the entire website (along with my bin folder, after publishing)again otherwise my site just doesnt work.Its very time consuming.
View 6 Replies
Sep 8, 2010
I created a website. If i upload html pages to my website, it works good. but when i upload asp.net pages, it cannot work. why? is there any coding changes to my web config.
View 2 Replies
Oct 28, 2010
I have created a Website with some DataBase (using LINQ to SQL).
can i upload Website & DataBase at different Places like on different machine etc.
I use "CuteFtp" for upload Website.
View 1 Replies
Jun 3, 2010
how to upload a aspx website project to a webserver.
I have tried to test the website with the LocalHost, and it is working. The project has both aspx and html files linked inbetween. How can I upload the project to a webserver and test it with the URL address.
View 3 Replies
Feb 3, 2010
what free website can i upload my asp.net pages for testing?
View 4 Replies
Sep 17, 2010
I am using Standard control FileUpload asp.net to upload a simple file to server. When I select a file and submit, the page is refreshed to the file is uploaded to server. Then I using a UpdatePanel to perevent the refresh. But in this way the file is not uploaded and FileUploaded.HasFile property return false. What can I do?
View 3 Replies
Dec 7, 2010
While i am Uploading Some Video Files from my asp.net website(C#) for the first time, i foud some error which i am furnishing here under
"Access to the path 'D:inetpubvhostsdemon4netsalt.comhttpdocsStudy MaterialVideo+1' is denied."
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'D:inetpubvhostsdemon4netsalt.comhttpdocsStudy MaterialVideo+1' is denied.ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
i am planning to save my files in side the "
Study MaterialVideo+1,
Study MaterialVideo+2, etc..
" Folders
View 2 Replies
Feb 18, 2011
I got error 'Failure sending mail' after uploading my website online, but i m able to send mail when website is on local host:
[Code]....
[Code]....
View 7 Replies
Apr 2, 2010
i have created a website in VS 2008 express edition and i have a URL and hosting space and i'm sure the space in windows based and not linux based, all i want to know now is how to get my website onto the internet, do i have to up load it through VS or can i use a packaged such as filezila?
View 4 Replies
Aug 11, 2011
I have written a website and let the user upload their photo. It also resizes the picture to 400 x 400 and crops automatically to the center part of the picture. All of this works good but each file is about 355K each for JPG and PNG file formats. I just tried GIF and it is 49K but the picture is grainy when saved this way. Is there any way I can get the picture to a smaller file size with keeping it at 400 x 400? I really thought PNG would be the way to go and was surprised by it being the same as jpg. I don't want to lower the quality either for JPG files.
View 1 Replies
Jan 24, 2016
Currently I was done to insert data thru upload excel file. May I know, how to UPDATE the existing data using iploading excel file.
View 1 Replies
Nov 17, 2010
I wrote following code to update data to website. Code run; but I am not able to see my data if uploaded. Here we have facility to see what data is getting uploaded but I am not able to see my data.
// Above URL is not real as I do not want to disclose real URL as of Now
Uri targetUrl = new Uri("http://www.x86map.com/post-embed/ewspost");
HttpWebRequest request = null;
StringBuilder sb = new StringBuilder();
[Code]....
View 2 Replies
Sep 17, 2010
What is the efficient way to upload excel data to sql database?excel file consists of 4000 rows..so i need to save these records to sql database in web application,i know only by creating ODBC connection i.e
_path = @"Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=" + _path;
OdbcConnection _xlsConn = new OdbcConnection(_path);
_xlsConn.Open();
OdbcCommand _xlsSelSht = new OdbcCommand("Select " + columns + " FROM [" + _sheet + "$]", _xlsConn);
OdbcDataReader _xlsReader = _xlsSelSht.ExecuteReader();
while (_xlsReader.Read()){.....}
View 7 Replies
Mar 4, 2010
I am looking for best practice for uploading excel data in Sql server 2000 database through asp.net web application. Excel data will be predefined Format with almost 42 columns and out of 42 10 fields are mandatory and rest are conditional mandatory. i.e. if data exists it should be in defined format. I also need to validate for special character, length, specified format and so on.After validating, i need to store valid data into sql server table and provide export to excel functionality for invalid data for exporting in same excel format with indicator to identity the invalid cells.
View 3 Replies
Dec 25, 2010
I am using :
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://www.contoso.com/test.htm");
request.Method = WebRequestMethods.Ftp.UploadFile;
// This example assumes the FTP site uses anonymous logon.
request.Credentials = new NetworkCredential ("anonymous","janeDoe@contoso.com");
// Copy the contents of the file to the request stream.
StreamReader sourceStream = new StreamReader("testfile.txt");
byte [] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd());
sourceStream.Close();
request.ContentLength = fileContents.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(fileContents, 0, fileContents.Length);
requestStream.Close();
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
For uploading images and songs to the server. But the file is getting corrupted on upload. Normal upload is getting error due to security reason and access issues.
Had to dwell on to ftp. But in this case, file is getting corrupted.
View 1 Replies
Dec 12, 2010
when i upload a file i need to insert the data into sql server data (file will be in comma separated with different extension .ord) in vb.net file will be stored on server in a folder
View 3 Replies
Aug 27, 2010
I facing a problem when I upload a file from my side while the application is running in server.
The error shows below:
'C:Excel FilesStaff Directory1.xlsx' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
View 4 Replies