Web Forms :: Use Xml File For A Site Map?
Feb 18, 2010
I am trying to use a xml file to create a site map listing for my website. Here is the xml I am using:
[Code]....
I want it be displayed like so:
Header
-url1
-url2
-url3
ps, im using C#
View 3 Replies
Similar Messages:
Dec 10, 2010
1. I need to access the Site map File.
2. without webconfig file!
3. For ex: Admin,User
If admin Login all Menu will be visible
If user Login Limited menu Will be vislble.how to do that ,
View 1 Replies
Jun 23, 2010
I just deploy a test site [URL] , but i got The file '/Site.master' does not exist??. Both Default.aspx and Site.master are in the directory.
View 4 Replies
Jan 27, 2011
I'm running into a problem trying to download a file from the server. I'm receiving a IE 8 "Unable to open this internet site" error dialog.
Basically, I want to open a new page and pass in the file path and mimetype of the server's document using a query string.
My code is as follows:
[Code]....
The JavaScript:
[Code]....
This is the code of the page load event that will transmit the file:
[Code]....
View 3 Replies
Jun 3, 2010
I've been using a repeater to build a website's site map page by binding to the web.sitemap file. For example, to display 2 levels of links:
[Code]....
So far, everything works well. However, in some cases, I do not want to display certain pages in the site map. I've added a custom attribute to each node (nodisplay= 'true').How can i check for this attibute, and avoid it from being displayed by in the repeater.
View 3 Replies
Feb 9, 2011
Can I open executable files on a client machine from an ASP.NET site hosted on IIS?
I have tried using the following code in ASP.NET:
Process notePad = new Process();
notePad.StartInfo.FileName = "notepad.exe";
notePad.StartInfo.Arguments = @"E:abc.txt";
notePad.StartInfo.CreateNoWindow = false;
notePad.StartInfo.UseShellExecute = false;
notePad.StartInfo.RedirectStandardOutput = false;
notePad.Start();
and also in Javascript with the following code:
function Launch() {
var w = new ActiveXObject("WScript.Shell");
w.run('notepad.exe');
return true;
}
But both snippets will only open the file when the site is not hosted in IIS.
View 3 Replies
Jan 17, 2011
I am trying to automate the creation of an excel workbook from data retrieved from a SQL server. I have successfully automated the process and the file successfully saves in a pre-determined location as a 57kb xlsx file. However, when I run the Response.TransferFile code, a file is downloaded that is 18kb in size, and when you try to open the file, it says that the file has an invalid extension. Here is the relevent code:
[Code]....
I have tried multiple content types and different ways of specifying the content type (Response.ContentType = XXX, Response.ContentType = "application/excel","vnd.ms-excel",etc). Nothing works. I can't figure out why the filesize is different even if the extension is wrong.
I can navigate to H:/test/filename and open it just fine, so the excel portion of the code is working fine. I don't understand because this code is so simple yet goes so horribly wrong.
View 1 Replies
Mar 27, 2011
I have a create form.. I want to upload flash files into my detail page.. can anyone show me an example on that ?
View 7 Replies
Jun 21, 2010
i'm trying to do something weird. I have two sites, one that allows me to handle some information and administrate it (site 1). I have another site that is for querying information only (site 2). I need to upload files in site 1, but i need to save it in site 2, to leave it available to download in site 2.
View 4 Replies
Feb 10, 2010
I want to push a file to the browser from a website using a webservice. I'm currently reading the file into a base64 byte array, and returning that from the webservice. This webservice is called from a website, and i'm stuck on how to push this as the original file to the browser. Ideally I would like to read the byte array into a memory stream, and then just write it to the Response stream if possible so the end user just downloads the file.
View 4 Replies
Feb 8, 2010
I don't think the site has a web service available, so I need to pass the login credentials and read the xml file (e.g.https://www.somesite.com/needthisfile.xml). What do I use to do this?
View 1 Replies
Jan 29, 2010
We have a web farm and are writing temp files for reports. We set up a file share and are using impersonation to write the temporary report files to that share. We gave the account doing the impersonation full control to the share and the folder itself.The files are writing correctly but are not being deleted.Is there something we're missing with this setup?
View 4 Replies
Apr 1, 2011
I have an aspx website and I'd like to upload a file to it. The file is being processed later, so I need to support some extra information with it.
This is the website I have to far:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Upload.aspx.cs" Inherits="ABC.Web.Upload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="Form1" method="post" enctype="multipart/form-data" runat="server">
<input type="file" id="File1" name="File1" runat="server" />
<input type="text" id="FileId" name="FileId" runat="server" />
<input type="submit" id="Submit1" value="Upload" runat="server" />
</form>
</body>
</html>
This (and the code behind) works very well when using a browser and clicking through the form. But I want to upload the file using the WebClient from C# code. I don't have to use the WebClient. I can also modify the upload.aspx to suit me, there is no requirement that it works from a browser, but this is the only example I've got working.
Looking at fiddler (I just started using it, so I probably have missed it) I could not figure out how I would create such a request from code.
At the moment when using the WebClient I am specifying the address and the local filename. I have a breakpoint in the code behind in my website but the File1 and FileId are not set (as expected).
How do I have to modify the website and how do I have to use the WebClient to get the upload working?
EDIT: Just found out about the Request.Files, that will give me the file, but how about the other fields?
View 1 Replies
Jan 9, 2011
I want to import DLL file in my web site project. I have dll file "my.dll" in folder C:DLLDir and I'm using the code :
[DllImport("C:\DLLDir\my.dll", EntryPoint = "Out32")]
This works ok. But I want to use relative path (web site root path) . I'm trying to put "my.dll" in "bin" or root folder and I'm using the code :
[DllImport("my.dll", EntryPoint = "Out32")]
but I'm getting the error: Unable to load DLL 'my.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
View 3 Replies
Nov 12, 2010
I've been thinking about this for a couple days but still would like some feedback on the best way to go about this:
I have multiple sites (domains) that will be running the same code. However, there are a couple settings I have in the appsettings web.config file which are relative to each site. (ie: defaultSiteTitle, emailFromAddress, etc).
I would like to deploy this application in only one location (folder) and point the domains in IIS to that one directory.
To do this, I believe I cannot use the web.config file to hold these settings...
So, I decided to make a SiteSettings.xml file and load the site settings in there:
<sites>
<oSite domain="abc.com" defaultSiteTitle="This is Site ABC" emailFromAddress="info@abc.com" />
<oSite domain="xyz.com" defaultSiteTitle="This is Site XYZ" emailFromAddress="info@xyz.com" />
</sites>
So when I need to access the site settings I just call a function in my datalayer that reads this xml file and via the httpRequest I pass it it determines which site settings to use.
Okay, that works when I call it from a page where I have the httpRequest...
Howver, now when I'm into some business layer functions say sendEmail and I need to find the emailFromAddress from the SiteSettings.xml file, I don't have the httpRequest. I know I could probably hack something together and pass it someway...
But I'm trying to figure out the best way to do this...
I don't really want to store it into session.
Is it possible to tell IIS what web.config file to look at, if I had multiple web.config files? (I don't think this is possible).
View 2 Replies
Oct 21, 2010
I have an ASP.net 2.0 website that sits on a Windows XP SP3 box on IIS 5.1. The website needs to go across a UNC path to another server to grab an image file. Both boxes are in the same workgroup but no domain is setup. I have created the same user on both boxes with the same password and the website is using anonymous access using that account. The account is an admin on both boxes(i know security risk but this is for testing). File.Exists() just keeps returning false but the file is there. I suspect it has something to do with the ASPNET account but i'm at a loss. I've tried aspnet impersonation using that account as well with no luck.
View 4 Replies
Mar 2, 2011
I have two web application. one is A and another is B. I want to send the data from Site B to Site A from javascript so that it should come as a pop up on site A. How can i achieve this thing? Is it possible or not? Need Response as soon as possible.
View 2 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
Feb 3, 2011
My computer system froze on me, the mouse froze, cntrl-alt-del, did nothing, so I reset it. Did a disk check, and now everything seems fine except for my master Page html code which I was in the middle of editing when it happened. The VB code-behind file is still ok, the designer file still shows ok with all of the controls in it, but I can't get into desgn or source view. It just opens and gives a whole page of hesixecimal code such as as:
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
It just gives me a whole page full of numbers like this. I haven't backed up for a few weeks and so I hope I can get this back.
View 3 Replies
Oct 27, 2010
How can I track the users who visit the site using Log file. I want to automate the same. We have deployed around 10 websites on the web server which include .net and Flex applications. I want to make the report of site usage. Would it be possible to do the same using log files?
View 7 Replies
Jun 16, 2010
logging to another website and uploading file to that site.
View 1 Replies
Mar 2, 2011
I'm building an ASP.NET application, which will create Windows accounts and groups on the server, and set file/folder permissions for those accounts.
How do I accomplish that?
I've considered shelling out to CACLS.exe, but I got a feeling that's going to get me into other problems eventually. Are there any other options in the .NET framework?
View 2 Replies
Feb 16, 2011
I had made a change to the MasterPage and I would like to publish this to my production server at Server Intellect.
I wanted to know, that since I re-compiled the site, and saw the changes locally, do I now need to FTP all of the files?
Or can I just upload the file that I changed- the MasterPage?
Also, Im planning on making a change to a Class. Can I just upload that .cs file by itself?
View 5 Replies
Sep 30, 2010
I hosted two asp.net web project in IIS with unique VirtualDirectory (sample and Sample2). Now i access a web page from Sample site and from this page i'm sending request to a web page in a site Sample2 with some values through Query String. I got the page and the values from query string.
Now my problem is, instead of sending values through QueryString is there is any other way to pass values from one site to another. Because, i never give the url for the second site to client. They know only the first site url based on user input i'll redirect it to the second site. Problem is user can see the values passed through QueryString and there is a chance to bookmark that link by user, it just like hacking. I donot want the user to do that.
View 2 Replies
Jun 17, 2010
I have uploaded site on web server but I am having the following error.
"Could not load file or assembly 'MySql.Data, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
View 4 Replies