|
In general data files should go in the App_Data folder. I would suggest putting them there.
Ben
|
|
|
|
|
Actually these are not Data Files.
They are just schema definitions. They will be filled with data within code and then returned.
Atul
|
|
|
|
|
Right, but you could also put the empty dataset.xml in the App_Data folder as well. Not that you need to, but that is where it would naturally go and since the schema file (xsd) applies to that xml dataset, I would say it logically suggests to put the xsd file in the App_Data folder. Normally the only thing I put into App_Code is BasePage type stuff that all my pages inherit from or some BaseUserControl stuff. I also have some HTTPHandler stuff in that folder. I don't really consider an xsd file code so I would not put it in the App_Code folder. I guess if you had several xsd files perhaps you would want a new folder.
Ben
|
|
|
|
|
XSD files are compiled and therefor one would expect they have to go in App_Code?
I also suspect you'll have difficulty returning a fully fledged data set object through a web service.
|
|
|
|
|
To my knowledge XSD files are not compiled. They are just schema files. They describe the rules for the xml file they are the schema for. In my experience I have not had any issues returning a fully fledged data set through a web service. As far as the web service it is just a dataset. It is your caller and the web service that need to understand what is in the dataset.
Still it sounds like you want to put the xsd in App_Code. In the end it doesn't matter that much. I was just giving you my opinion on where I thought it should go.
Ben
|
|
|
|
|
Hi
How do I add the user "everyone" with full control to the security settings of my web.config file. I need to chane the web.config file via my web service so that I can set my connection string as required per client
Regards
|
|
|
|
|
DON'T !!!
you can use info about the connecting client to construct the connection on the fly in code. But never change web.config from code.
note that changing the connection srting per client makes you loose connection pooling benifits.
|
|
|
|
|
I have to
This is a fire detection server that will be standing behind a firewall and no-one can have access to it from the outside. No one will consume the web service from the outside. However for my technicians to install the system on the mine they need to change the connection string to connect to the database as the path of the data base can change on a per install base
Regards
|
|
|
|
|
I think the web.config is readonly in runtime 'cause the web
application is forces a restart the it detects a changed web.config
file. So either if you can change it I don't think its saved until the
webapp restarts or the web.config is readonly in runtime.
|
|
|
|
|
I wrote and article which describes how to change the web config file programmatically. I think if you follow my article you can created a domain user that you set up as the identity of your app pool that your web service runs under. Then you could change the web.config. NOTE when the web.config is change the application will restart. If you are talking about the web service changing a different web sites web.config that is pretty dangerious, I would suggest a different solution if at all possible.
http://www.codeproject.com/useritems/SingleWebConfigFile.asp[^]
Hope that helps.
Ben
|
|
|
|
|
Hi Ihave looked at the article a while ago. Nice one, if I may say so, but it does not quite suite my needs.
I just need to change an element in the connectionstringsettings to the connection string of my database. This connectionstring is unique per installation. If I change the security settings of the web.config file via Explorer then my code works well, and I can change the connection string as I please.
I just need to change the security setting programmaticaly
Regards
|
|
|
|
|
Dear all
Please find the below sendMail() procedure
1. if the To email Id is external emailid <meetme@yahoo.com>then the email is not delivered
whereas if the emailid is same domain it is working fine .....
Sub sendMail()
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.company.com"
.update
End With
With cdoMessage
Set .Configuration = cdoConfig
.From = "info@company.com"
.To = "someone@yahoo.com"
.Subject = "Inquiry"
.HTMLBody=strMsg
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End Sub
can anyone tell me what is wrong with my script....if not what is the solution for this issue
Thnaks inadvance
N.Rajakumar B.E.,
Application Developer
|
|
|
|
|
is that VB.net code?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
The code is in VB Script for my ASP Application .....not .Net
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
So that is client side code?
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
|
Hi Vasudevan Deepak Kumar
Thanks for sent me a web link but it speaks about .NET ..I want this to be done with ASP
let me know if you have any idea....
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
Concept is same. .NET BCL actually wraps around the same CDO object.
|
|
|
|
|
Hi there,
I want to upload a file from the local pc to the server by using php.
I am getting following things in php from html "":
$_FILES['browsefile'] = Array
$_FILES['name'] = WorkReport.xls
$_FILES['type'] = application/vnd.ms-excel
$_FILES['size'] = 13824
$_FILES['tmp_name'] = c:/wamp/tmp\php7B.tmp
$_FILES['error'] = 0
$ftp = ftp_connect("ftp.example.com");
$ftpLogin = ftp_login($ftp, "user_name", "*****");
$fileName = $uploadFileName['name'];
$fp = fopen($fileName, 'r');
ftp_fput($ftp, $fileName, $fp, FTP_ASCII)
by giving this I am getting following error:
Warning: fopen(WorkReport.xls) [function.fopen]: failed to open stream: No such file or directory
Warning: ftp_fput() expects parameter 3 to be resource, boolean given.
Can you please tell me how can I solve this problem??
Or if you have any other idea reguarding uploading a file from local pc to the server then please tell me with the sample code if posible.
Thank you in advance.
|
|
|
|
|
You want to use $_FILES['tmp_name'], this is where the file is temporarily stored until the request is processed. The file name just tells you what the file was called before it was uploaded. NB: bear in mind that after the script has finished processing the temp file will be deleted, you have to move it manually if you want to keep it.
|
|
|
|
|
Actually I dont want that temporary file I just want to copy that file to the server. Then after if temporary file deletes then its ok for me.
But I don't know how can I copy that file to the server.
|
|
|
|
|
Probably, but can you please go to the suggestion forum and endorse my idea for a PHP forum.
Anyway your problem is that you seem not to have opened the "TEMPORARY FILE". The fopen should open the temp location where the uploaded file is stored. Does that work?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi I tried by another way that is
$ftp = ftp_connect("ftp.example.com");
$ftpLogin = ftp_login($ftp, "user_name", "*****");
$fileName = basename($uploadFileName['name']);
$uploadDir = "ftp://ftp.example.com/TempUpload/".$uploadFileName['name'];
move_uploaded_file ($uploadFileName['tmp_name'], $uploadDir);
ftp_close($ftp);
yet it is giving me following errors:
Warning: move_uploaded_file(ftp://ftp.example.com/TempUpload/Case Studies for uploading.doc) [function.move-uploaded-file]: failed to open stream: Invalid argument
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'c:/wamp/tmp\php90.tmp' to 'ftp://ftp.example.com/TempUpload/Case Studies for uploading.doc'
Can you tell me how I can solve this problem or why it is giving me such kind of error?
|
|
|
|
|
Your problem there is that you have not logged into the FTP server where to want to store the files. Try:
$uploadDir = "ftp://username:password@ftp.example.com/TempUpload/".$uploadFileName['name'];
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Thank you.
Your single line of code is removing my four lines of warning.
Thank you so much.![Rose | [Rose]](https://codeproject.freetls.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|