|
Hello, I am getting the trusted location error on "c:\documents and settings\XXXXXXXX\Desktop\Projects\app1\app1" which is an absolute local path. According to everything I've read this should only come up on UNC paths... any ideas?
|
|
|
|
|
Is this something you've downloaded? If so, right click on the Project file and select Unblock.
|
|
|
|
|
Thanks Pete, it seems that is the problem.... is there a way to turn off these rediculous 'helpful' features?.
EDIT:/
http://www.nforcershq.com/forum/image-vp592089.html[^] shows how to turn off that annoying thing.
run gpedit.msc
Goto: User Configuration > Administrative Templates > Windows Components > Attachment Manager
Enable: Do not preserve zone information in file attachments
modified on Tuesday, January 15, 2008 10:40:58 AM
|
|
|
|
|
Hello to everybody,
I was wondering how to use this function to have the Real Object instead of the trasparent proxy one.
I'm asking this since I wish to use .NET remoting to remotize a SQLDataReader. Last Time I tried I have a really bad performance, since each single sdr.Read() returns to the remote object and then to the calling client, with a really high time overhead.
I've seen that ObjRef has got this method : GetRealObject(StreamingContext context) , it's possible to use it in the code or it's used just when overriding it? if yes, where I get this StreamingContext?
Thanks
Paolo
|
|
|
|
|
Hi all,
Is there an easy way in .NET (C#) of setting up a drawing area from the page size in the printer settings? I want to produce an effect something like Word/OpenOffice Writer where an A4 page can be drawn to and printed. In MFC I could do this with CScrollView but am struggling in C#.
TIA.
|
|
|
|
|
Afternoon everyone,
Having just spent the last couple of hours refreshing my memory on how Code Access Security works I'm left wondering whether anyone actually bothers with the hasssle of it all. Certainly none of the projects I've worked on do. Seems like a right bore.
Has anyone actively used it, and if so in what context?
Regards,
Rob Philpott.
|
|
|
|
|
Try running your .EXE from a network source without understanding CAS. I do this all the time.
|
|
|
|
|
Dave Kreskowiak wrote: Try running your .EXE from a network source without understanding CAS.
We simply have a policy of "if you want to run that app, copy it to your machine." For the moment, there aren't any apps we have that really need to be run from a network share.
Nice to know where to look if we do though..
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
|
|
|
|
|
I distributed a policy to all of my machines that just tells CAS that any assembly signed with "this" key is fully trusted. Then I can copy any .EXE I want, signed with the correct key of course, to the net and it runs without any trust issues.
|
|
|
|
|
Hello,
I want send/raise an event inside a workflow activity.
I can't find any example for this. Send an event in the workflow runtime is no problem, but i need the same inside an activity.
Stephan
\\\| \\ - -
( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| <a href="http://www.stephan-pilz.de">www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
|
If you don't get an answer here try asking in the Workflow MSDN Forum.
Kevin
|
|
|
|
|
Is it really important to create event log sources using the method CreateEventSource of the EventLog class? I tried to write a log to an event source that didn't exist in the "Application" log, and the log was written successfully(without creating the source). If it's possible to write event logs to sources without creating them, why should we ever use CreateEventSource?
|
|
|
|
|
CreateEventSource has two purposes.
The first is if the event log didn't exist. In your case, if the Application log didn't exist, you'd have a difficult time writing to it. You have to create the log first before you can write to it. This, obviously, doesn't apply to the Application log on NT Kernel Windows because it's always created when Windows is installed. But, for custom event logs, you have to create them first before you write to them.
The second is security. Not every application can write to every event log. For example, the Security log is off-limits to your application. You have to be cleared to write to an event log. You also have to have a registered event source on the machine in order to write to an event log. If the event source you're using already exists on the machine, you don't need to to create one. YOu simply specify the existing event source.
If you don't specify a Source, th eonly log you can write to is the Application log, which is available for writes from any application, or I should say that it is available for write from any event Source.
Normally, if you create a custom event log, you'd do this at the time your application is installed, not during the execution of your app. Along with the log, you'd create a new Source that is mapped to that log. When your application is run, it would use this Source to write to the log.
|
|
|
|
|
Hi, I have a problem of converting .flv video to .3gp format automatically on my ASP.NET web site. Unfortunately I was unable to find any managed library I can use to solve this task. Do anybody use some or can point me the page I can find some information on how this can be perfomed? Thanks in advance.
|
|
|
|
|
Not sure if there is any. Have you tried googling it?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Yes, sure. I've tried to find it, the results was not so good. I've found just one managed wrapper for library which supports .flv but it is not possible to convert to .3gp.
|
|
|
|
|
I'm writing a windows service that builds a URL with a specific query string that needs to be sent to the internet. I don't care about the response coming back. How would I do this?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Actually, in this case the easiest thing to do is probably use the WebClient. It's got several convenience methods for sending requests and since you don't seem to need anything complex (you don't care about cookies or authentication?) it should do the trick.
Also, if you haven't already, take a look at UriBuilder. A very convenient little class that will build full Uri's and query strings for you.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
|
|
|
|
|
MSDN states the following for the ServiceBase.EventLog Property: "The constructor initializes the EventLog property to an instance with the EventLog.Source and EventLog.Log properties set. The source is the ServiceName of the service, and the log is the computer's Application log. These values are set automatically and cannot be changed for automatic logging of service commands."
Does this mean that the installer class(inheriting from System.Configuration.Install.Installer) associated to the service automatically creates the source for the event log of the service when the service is being installed by the tool installutil.exe? Or should I create this source manually in the installer class(by overriding an appropriate method of those of the System.Configuration.Install.Installer in my derived installer class)?
Appreciating your feedback. Thanks in advance!
|
|
|
|
|
MSK61 wrote: MSDN states the following for the ServiceBase.EventLog Property:
Yes and below that it says:
If you want to write entries to an event log other than the application log, set AutoLog to false, instantiate a new EventLog in the constructor for your service component, and override the OnStart, OnStop, and other command-handling methods to explicitly post entries to that log. You cannot use this EventLog instance to write to logs other than the Application log.
That seems pretty clear to me so I am wondering how you got to the question you asked?
|
|
|
|
|
I have been playing around with this for some time and I can't get an elegant solution. My code always looks like I am missing some obvious library.
We have a lot of old fortran code lying about doing Numerical Simulations. I am trying to get some movement into a sensible coding environment. It is becoming prohibitive using Fortran since the skill set (across our company) is diminishing and therefore becoming expensive.
Step one:
Recompile code using the SilverFrost compiler using the .NET options.
Step two:
Call Fortran code from C#.
Step Three:
Start putting result from Fortran into a biggish Sql say 5GB per model run od so
I have got something sensible for steps 1 and 2 and general movement is going in the write direction, step 3 seem to be convoluted.
say I have 1 dimenesional array of doubles, I simply want to record in the DB
something like
Index,Answer
0,0.1
1,0.2
2,0.3
3,0.4
4,0.5
5,0.6
6,0.7
7,0.9
currently the Fortran just writes CSV files in the above format.
We could bulk copy the CSV files into the DB but seems like an unnessary step (the CSV file), why not direct?.
We could convert the Arrays into DataTables and use SqlBulkCopy,
( just making the DataTable seems inelegant )
We could write a custom IDataReader for arrays and use SqlBulkCopy,
(Idatareaders seems to require an enormous amount of unsued methods to implemnt)
SqlBulkCopy is not an option for things like Access though or SqlCe if we wanted to use a similar methodolgy for smaller localised models
So the question is whats the "best" way of getting a large .net array into SqlCe,SQL and Access datbases.
I guess thats 3 questions one for each format
Carl
DrTip
|
|
|
|
|
You can either do this using an SSIS package (SQL SErver only), or do something closer to this[^], which would be more a more generic approach.
|
|
|
|
|
Thank Dave
I am aware of both of these methods. But I think you have missed the point of the question
The thing we want is to write lots of data to a database directly from memory without first writing to an intermediate text file.
The data is generated from a numerical model that typically takes 18 Hours to run.
Carl
Quick the boss is coming...
|
|
|
|
|
Well, you said it yourself - the FORTRAN code wirte this stuff to a CSV file currently. Your ONLY option is to rewrite the FORTRAN code to NOT write it to a file, but instead open it's own connection to the database and start writing it there itself, as the data is generated, one record at a time. This is because of the lack of a bulk copy in anything other that SQL Server.
modified on Thursday, January 10, 2008 4:23:15 PM
|
|
|
|
|
I was going to ask this in the Vista forum but that appeared to refer more to the Vista win API than to how the .NET framework runs on Vista, so I'm asking here..
Maybe my Google-fu sucks, but I can't seem to find any pointers on how to write applications to ensure they'll run on Vista without elevated privileges.
In particular, I'm interested in the following things that will trigger the elevated permissions system:
* Which P/Invoke functions to avoid
* Which .NET namespaces to avoid (the Cryptography namespace forces elevated privileges?!?!?!?!?!?!)
* Which files and directories to avoid (I know, \Program Files\ and %WINDIR%\system. Any others?)
Also, a bonus would be some kind of tool that will tell me specifically which of these areas will cause Vista to refuse to run my application. I found this tool[^], but all that does is report errors from the low-level operating system API that mean very little to me.
Fundamentally my issue is that I'm writing an application that RUNS fine on XP, INSTALLS fine on Vista using a VS2005 setup project, (but it DOES request elevated permissions), but it will not RUN on Vista (UAC does ask to allow the program to run). And even when the user selects ALLOW, the program still crashes.
For the life of me I can't seem to pinpoint why. The best I seem to be able to find are recommendations of embedding a manifest file to demand admin privileges. Well, that isn't what I want to do. I want my application to run under normal user permissions, but I can't figure out WHAT in my application is triggering the request to elevated privileges.
Pointers are appreciated... this is pretty aggravating.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
modified on Monday, January 07, 2008 4:03:11 PM
|
|
|
|