Iis - Modify Content Of XML File From Published Code?
Aug 18, 2010
I am trying to modify an xml file from my aspx code. The file is in another directory from my project like in D:folderfile.xml When publishing my code and running it I am receiving an error as not to be able to access this directory, access in denied. Which user account shall I add to this folder in security option to be able to modify it. I tried adding IIS user but it does not seem to work.
View 2 Replies
Similar Messages:
Jan 5, 2011
I would like to find a way to read a txt file (in my case delimited by ¤). I need to change the order of the columns and also add and remove some columns. My output file should be a txt file delmited by ;.
I tried Jet.OLEDB to read the file and put it into a datatable and then used a stringBuilder and streamwriter to get an output file in .txt format. However. This does not me since I´, reading the txt file from start to end and my output will be the same. It does not seem like I can have a custom sql statement when reading the file. The only query that works is
Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from 1.txt", TextConn)
How can I possible modify a txt file?
This is my code for now:
[Code]....
View 1 Replies
Dec 12, 2012
I published a project called TestSample which has 2 pages page1.aspx and page2.aspx and application dll Test.dll in bin folder.
what i need is, i want to create a new page called page3.aspx and page3.aspx.cs through programmatically which is done by file stream object, my need is to publish this page3.aspx to the TestSample virtual directory and also page3.aspx.cs has to be merged with Test.dll so that code behind should be avoided.
View 1 Replies
Aug 20, 2010
In my orginal post i asked the question to handle this within the .Net side.
I was trying to stay away from using SSIS package, and with help from another member, i was able to get the process to work with an excel spreadsheet.
But part of my project requires us to allow .csv files.. so my question is how can i modify the code i have now for the excel to work with a .csv file?
You can find the current code in my original post here:
[URL]
I not sure what the best solution is for the end result.. I was reading somewhere online that you can right the data from the file to a datalist or gridview so you can present the user with a view of what is being uploaded, then use that datacontrol to insert into SQL.
In my current code, im uploading the file, then using that file to do the insert. This works fine for .xls files.. but i need to accomplish the same thing for a .csv file.
View 11 Replies
Nov 14, 2010
[Code]....
View 2 Replies
Dec 29, 2010
I published my asp.net app using the basic capability (publish to disk). Now I look at the published content and it contains .cs files. Is this correct? I did right-click 'convert to web application', but the .cs files still appear.
View 1 Replies
Jun 22, 2010
I have a WCF 3.5 service with JSON and a aspx page consuming it by using ASP.NET Ajax Library
I was able to call service succesfully.In the aspx page I wrote my Java code directly and then I wanted to modify my JS function but it is always picking the old JS function code
I even restarted the machine no change, looked up on the internet, msdn and I have Default pool with Integration mode
code bellow
<asp:ScriptManager
ID="ScriptManager1"
runat="server" [code]....
View 2 Replies
Jul 3, 2010
I created a master page and have several aspx page using it. Now I want to change each of the background image of the page that is using the master page. I used dreamweaver to change its background image but I get an error :
Only Content controls are allowed directly in a content page that contains Content control
How could I modify the background image of each of the content page??
View 3 Replies
Mar 21, 2011
I want to show the current date and time in the Web Site but retrieved from a table in the data base. This table contain a preloaded .csv. I want to put something like: Date: datefromrow Time: timefromrow
However, I dont know how to connect it on here with the C# code.
[Code]....
[Code]....
I tried the page control, but it is not placing in the place I want...
View 1 Replies
Feb 9, 2013
Can I get Code website asp.net by save it or another way
the web site published on the internet by another person
View 1 Replies
May 7, 2015
I deployed  (publish) website in visual studio 2012 ..Â
But now I want to revert back and get code from generated dll..
i.e., Â deploying created dll, and IÂ want code from dll.. How to do this...
View 1 Replies
Nov 22, 2015
I have a pdf file which has some textfields which i created using form tool in acrobat. And i wanted to add PdfPTable through code to add database table in my pdf file. but i dont know how to add PdfPtable in this scenario.
View 1 Replies
Oct 3, 2010
I have the following code in visual studio 2010:
TextBox1.Text = My.Computer.FileSystem.ReadAllText("C:UsersBabyDesktopSimulator websiteResourcesTextFile.txt")
It reads the text in the textfile and displays it in the textbox. However, this link only works on my computer. How do I change the code so that when published online, it still works on anybody's PC? I think i need to refer to a relative path, but do not know how this should be done.
View 1 Replies
Feb 5, 2014
How can I tell the difference between source and published .NET code?
I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?
Is the .csproj file or the .sln file part of the code pushed to the server when you publish? What other differences are there that I are immediate and obvious?
View 1 Replies
Apr 21, 2014
I have a site which some one designed for me .. after i decompiled my dll files i got *.cs files that i can edit ... when i am trying to edit these pages i can only find the titles of pages but i can't see the rest of text in the site
how can i get all pages's text !?
View 1 Replies
Oct 24, 2012
Imports System.Collections.ObjectModel Imports System.Management.Automation
Imports System.Management.Automation.Runspaces Imports System.Text
Imports System.IO
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If DropDownList1.Text = "ABCD" Then
Label1.Text = " ServerB" End If
[code]....
I have an ASP.NET site I built for our users to map a network printer. When I test it, it maps the printer without any probelms. When I publish it to IIS, it acts like it's going to run, but never tries to map it. I have checked all the permissions, I have tried it as a web app and a web site, I have tried to publish both and I have tried to copy and paste the folders in the root folder. I have added references to the Microsoft.Powershell.XXXX. I have changed it from "CodeBehind" to "CodeFile" and I have changed the "AutoEventWireup" to "true". There are no errors in the event log and none on screen. It clears the fields, like it should at the end of the code and that's it.
View 1 Replies
Mar 3, 2014
I have a tricky situation. My application got deployed in production. A lable value needs to be changed but the problem is am setting the label value dyanamically from page load of my page. Is there way to change the label value withour redeploying? i can change the logic on codebehind but that requires another deployement which i don't want to do that as it is production.
View 1 Replies
Jun 29, 2010
I am using ItextSharp and I am getting a new font for it by doing this
[Code]....
That file is in that directory on both my dev machine and the server. When i run this on my dev machine it works fine, when published to my server I get an error saying FREE3OF9.TTF is not found as a file or a resource. I have double and triple checked that the file is in fact there on my server. My application has full trust on IIS. and IIS user has full access to this folder and this file.And still I get this error. Very frustrating. This code is Not inside the Web Application but inside a DLL class library that the web application is referencing. Do I need to add any more special permissions or something?
View 10 Replies
Dec 23, 2010
I am trying to embed a visio doc in an aspx page using the following code
<OBJECT classid="CLSID:279D6C9A-652E-4833-BEFC-312CA8887857"
codebase="http://download.microsoft.com/download/4/5/2/452f8090-413f-408f-83c0-edd66db786ee/vviewer.exe" [code]...
i need to modify the value parameter SRC from code , how do i go about it ?
View 2 Replies
Oct 24, 2010
How can one modify DomainService code without the custom code being overwritten?
Is there a way to put the custom code in a seperate class file?
View 1 Replies
May 14, 2010
how to use zippackage class to know about the content in .zip file?for ex to know the type of file inside this zip file.
View 1 Replies
Feb 2, 2010
I want to create an asp.net application which allow user to specify text file path and create a text file on the specified location by doing some processing from the sql server database.for specifying path of the txt file i am using setting
.xmlsetting.xml
<TextFilePath> "D:Text" <TextFilePath> //as specified by the user.
The code is working fine if it is not published Once the application is uploaded on the server(published) and run under the virtual directory.
View 3 Replies
May 26, 2010
After publishing the console application. We changed few connection strings related values in the app.config file, but the values changed is not been reflected in the published version.
What might be the cause for not reflecting the values which has been changed ???
View 2 Replies
Feb 28, 2011
by looking at using the XmlDocument and creating elements and attributes and then inserting them into the document. Pretty soon this looked like a massive amount of work for all the elements I have to add.What are the repercussions of treating the config file as one big long text string and doing a replace at certain points to add my entries. Something like this...
private void InsertXMLElement()
{
StringBuilder webConfig = new StringBuilder();
// get the file into a stringbuilder for manipulation
using (var sr = new StreamReader("C:web.config"))
{
webConfig.Append(sr.ReadToEnd());
View 3 Replies
Mar 11, 2010
I'm repeating my question because the prior one under this topic was lost.
I want to use MicrosoftReportViewer for Web Forms so that the DataSource be set programmatically. There is some sample code on the Internet for Windows Forms but I haven't found anything for Web Forms. For example, here is some code I've tried to use. It gives no errors but nothing is displayed.
How should I modify the code to display a table in the ReportViewer?
[code]....
View 1 Replies