pdluke wrote:
Is it possible to copy an file from one webserver to another via code?
I think there is no direct method available. You can do in other way, webserver where files to be copied can request to the file located on this server using WebClient classes DownloadFile() method.
pdluke wrote:
Now I'd like to provide the file download for the user. I know, that a direct link is one possiblity, but I'd lik to start the file download via code, too. Is ther any Method or something which handle this?
Just do Response.Redirect() to the file you want to get downloaded. If file extension is not mapped with any ISAPI module, then browser will prompt Save dialogbox.
My Website | Ask smart questions
Or.... just write a function to check all your input fields before processing them? Little things... like making sure numeric values are in "int" and strings are properly quoted out and escaped before concatenating the final SQL string works fine too. Just gotta be careful.
Process.Start
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
I use the following construct in my system: INSERT INTO myTable(ID, Employee, Project, Date, ...) SELECT MAX(ID)+1, @Employee, @Project, @Date, ... FROM myTable; and it works fine. Hope it helps.
Use this.GetType().GetProperties() to get an array of the properties, then us the GetValue method of each to get the value of the property for this and obj2 to compare the values. If you're not exposing all your data as properties, use GetMembers instead.
-- Rules of thumb should not be taken for the whole hand.
The problem you are running into is because the Membership provider is looking for "LocalSqlServer" which comes from the machine.config and points to SQLExpress. To correct this can add a clear element only two letters away from being an asset