|
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.
|
|
|
|
|
Hey no problem, Glad I could help you.
I am currently asking the site owners here to put a PHP forum in. Can you post your opinions here: Linkety[^]
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Save the file uploaded and then use the saved one for FTP.
|
|
|
|
|
Does anyone know how to permanently add a toolbox tab to Visual Studio such that the Ajax Controls are loaded for every project?
|
|
|
|
|
|
Ask one.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Don't use caps
Don't use the word urgent
Post your code
Use code and pre tags!
Don't use the word 'doubt' when you meant to use 'question'
|
|
|
|
|
|
I have a database(mydb) with userid fild data.
and i want to use AspLogin control and other control that manage membership
that uses aspnetdb of asp.net application.
so
how i can use the userid of aspnetdb and bring it in my own database(mydb)
when the users loged in ?
thanks
|
|
|
|
|
You have a couple of options:
1. When a new user is created you can hook into the event, get the Guid and username and post that into your database then.
2. Use Membership.User.Guid (I think thats it, better double check), this returns the Guid of the current logged in user.
|
|
|
|
|
thanks for your attention.
but
there isnt any member or method like Membership.User.Guid
anyway thanks again
goodluck
|
|
|
|