15,893,904 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by EricFowler (Top 9 by date)
EricFowler
16-Apr-11 15:06pm
View
This was the correct answer. It works now. Thank you for your assistance.
Eric
EricFowler
16-Apr-11 4:23am
View
Yeah - but they specifically granted OleDbPermission and OdbcPermission on the host. I want to do this:
protected void Page_Load(object sender, EventArgs e)
{
string sName = "~//mydata//myfile.txt";
StreamWriter w = File.CreateText(sName);
w.Close();
}
EricFowler
16-Apr-11 2:58am
View
Here is some info from my host:
"Trust level refers to permissions set in the Web.config file that dictate what operations can and cannot be performed by Web applications. Our ASP.NET 3.5 and 4.0 shared hosting servers use the default Medium trust level with the addition of OleDbPermission, OdbcPermission[this explains why the user information db works in App_Data], and a less-restrictive WebPermission.
Applications operating under a Medium trust level have no registry access, no access to the Windows event log, and cannot use ReflectionPermission (but can use Reflection). Such applications can communicate only with a defined range of network addresses and
file system access is limited to the application's virtual directory hierarchy
.
Using a Medium trust level prevents applications from accessing shared system resources and eliminates the potential for application interference. Adding OleDbPermission and OdbcPermission allows applications to use those data providers to access databases. WebPermission is modified to allow outbound http and https traffic."
So what is the 'virtual directory heirarchy'? I have created another directory in their control panel and given in the right perms but no joy in Mudville.
EricFowler
5-Apr-11 17:41pm
View
And I should add that when I have one item in the list, and I call foo(), the list item changes value before I add the second item to the list. So the memory is hanging around and being reused by foo(). But I am not clear why this would work in C# console app and fail in ASP.
EricFowler
5-Apr-11 17:39pm
View
From the original post:
"So I am populating a list of unique 'things' by calling a fxn.
When I run as a console app in C#, all works as I would expect: I get a list of 'things' with x = 0,1,2 ... etc.
When I call the same assembly from ASP.Net, with this code embedded in a web page, I get a list of 'things' with x always set to the last value in the array. In other words, the assembly seems to save a reference to the object and overwrites early values with late ones.
....
The Big Question is, why is this different in ASP vs. C#?"
EricFowler
5-Apr-11 16:55pm
View
I don't see how object lifetime issues are going to go away by making that change. If I declared foo() to return a Thing I would still have the same problem, wouldn't I?
EricFowler
4-Apr-11 22:05pm
View
Thanks for the advice. I have been programming in C and C++ for nearly twenty years, and in C# for a couple of years, but am a relative newcomer to ASP and web coding. This is of course an abstracted and simplified version of a real-world problem. I don't really name functions, types and objects 'C' and 'Thing' and 'foo' and 'blah'. Changing the signature of foo() is not really an option - it already returns a status variable.
Eric
EricFowler
4-Apr-11 22:05pm
View
All of the code (except the assembly) is in a single button handler, so I doubt it is a postback issue, unless there is something about postback I don't understand. Meantime I will try Session state, as soon as I figure out what that is.
Thanks
Eric
EricFowler
24-Feb-11 16:05pm
View
'Error C2039: 'QueryInterface' : is not a member of 'CAx0ctrl1''. So what do I QI() on?
CAx0Ctrl is derived from CWnd, and has methods for Create(), CreateControl(), GetCLSID(). I have noticed it calls an InvokeHelper() from one of the framework produced functions.
Show More