Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to Write To A FileHow to Write To A File
Previous
 
Next
New Post
1/30/2008 5:18 PM
 

Hi,

I'm using DNN 4.8, hosted by GoDaddy.

I tried to use a FileWriter to modify a file on the server but since GoDaddy is a medium trust, it throws security... exception.

I've seen 3rd party modules like Bi4ce's GoMap able to write to a file (config), and read from the file within the same website.

How do I do this? I have to be able to modify/append to an existing file.

I hope this makes sense. Thank you for your help.

 
New Post
8/15/2008 10:52 PM
 

Have you tried FileStream?

http://msdn.microsoft.com/en-us/library/system.io.filestream.aspx


Eric Garza
EGI Consulting
Dallas, TX
(972) 767-5930
View my profile on LinkedIn

Are you looking for DotNetNuke ModulesDotNetNuke Skins or DotNetNuke Support?

 
New Post
12/5/2008 3:02 PM
 

Hi,

I didn't use FileStream but I figured out the problem:

1. Have to use Server.MapPath to map into a physical location to write file to.

2. Don't use IO.File, use IO.StreamWriter <- works.

Sample code:

Dim writer As System.IO.StreamWriter = New System.IO.StreamWriter( _"~/" & localSetupFolder & "/" & setupFileName & ".txt"))"Testing")

Server.MapPath(

writer.WriteLine(

writer.Flush()

writer.Close()

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to Write To A FileHow to Write To A File


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out