|
Hi OBarahmeh,
I have had this error once in the recent past, from my experience regarding this error I would say that you haven't created a 'Virtual Directory' for your application in the IIS server.
applications always run locally even if VD is not created but you will have to create a VD for the appln to run on your server.
Go to:
IIS Manager-->yourserevr(localcomputer)-->WebSites-->defaultWebsites-->Rightclick YourApplication --> Properties-->Create
I am sure you know this(path) already, but I included just-in-case...
Good Luck.
Aartee.
...HE is watching Us All!
|
|
|
|
|
Hi!
Dear fellow ... i m building an application in visual studio 2003 in C# asp .net web application ....
I had a tree view in one frame and i open new forms accoring to the clik of the tree view But i have to fill this form after capturing the click event of the tree view as i need the value of that particular clicked node so that i may retrive my data From my DB according to that cliked node ........i dont know how to capture the events too please send me code in C#.... instead of asp
Thanx
|
|
|
|
|
Hi!
Dear fellow ... i m building an application in visual studio 2003 in C# asp .net web application ....
I had a tree view in one frame and i open new forms accoring to the clik of the tree view But i have to fill this form after capturing the click event of the tree view as i need the value of that particular clicked node so that i may retrive my data From my DB according to that cliked node ........i dont know how to capture the events too please send me code in C#.... instead of asp
Thanx
|
|
|
|
|
Hi,
I've been using ASP.NET for almost 3 years now, but never did any decent testing. I downloaded NUnit and NUnitAsp, I'm new to unit testing, and would like to know other peoples opinions as well.
Does NUnitAsp work with .NET 2.0 because I only source the project files as 7.1, which means it is intended for VS2003. Are there any similar programs like NUnitAsp, or is this about the best?
Something else...
I quote from the overview section of NUnitAsp:
"NUnitAsp is for unit testing ASP.NET code-behind only. It's meant for programmers, not QA teams, and it's not very good for QA-style acceptance tests. It only tests server-side logic. JavaScript and other client-side code is ignored. But if you're using ASP.NET, it's an essential part of your programmers' toolset."
So what do the QA teams use? And are there programs that test JavaScript and client-sided code?
And lastly, NAnt, what is that used for?
I hope to hear from someone soon?
Take care.
ma se
|
|
|
|
|
i created a simple webservice
<br />
<WebMethod()> _<br />
Public Function HelloWorld(ByVal person As String) As String<br />
Return "Hello" + person<br />
End Function<br />
andi created a vb.net application that i jus wanted to post the name and get back the response
<br />
' Create the web request <br />
request = DirectCast(WebRequest.Create("http://localhost:80/WebService_RPC2"), HttpWebRequest)<br />
<br />
' Set type to POST <br />
request.Method = "POST"<br />
request.ContentType = "application/x-www-form-urlencoded"<br />
<br />
' Create a byte array of the data we want to send <br />
byteData = System.Text.UTF8Encoding.UTF8.GetBytes(data.ToString())<br />
<br />
' Set the content length in the request headers <br />
request.ContentLength = data.Length<br />
<br />
' Write data <br />
Try<br />
postStream = request.GetRequestStream()<br />
postStream.Write(byteData, 0, byteData.Length)<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
Finally<br />
If Not postStream Is Nothing Then postStream.Close()<br />
End Try<br />
<br />
Try<br />
' Get response <br />
response = DirectCast(request.GetResponse(), HttpWebResponse)<br />
<br />
' Get the response stream into a reader <br />
reader = New StreamReader(response.GetResponseStream())<br />
<br />
' Console application output <br />
Console.WriteLine(reader.ReadToEnd())<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
<br />
Finally<br />
If Not response Is Nothing Then response.Close()<br />
End Try<br />
<br />
Dim responseString As String = Convert.ToString(reader)<br />
but this doesn't work when i debug the code i see that the request goes through and no exception is thrown as soon as i try to read the response
response = DirectCast(request.GetResponse(), HttpWebResponse)
i get an exceptiong is thrown saying
Quote:
the remote server return an error405)Method Not allowed
can anyone tell me what i am doing wrong is there something i am not doing correcly from the webservice side?
-- modified at 23:53 Saturday 10th February, 2007
|
|
|
|
|
Hai,
Just started to work with Visual web developer 2005. I want to know how to change the background color of a textbox when it gets focus. Please provide step by step instruction in doing so.
Thanks
|
|
|
|
|
The TextBox control only exists on the server, in the browser all that exists is the html code that the control created, i.e. a form field. As getting focus is something that happens in the browser, you have to use Javascript for that, so it really has nothing to do with ASP.NET.
---
single minded; short sighted; long gone;
|
|
|
|
|
Visual Studio Professional 2005 - C# 2.0, ASP .Net
How do you go about sending reminder notices? I've got an application that the client wants to have a reminder for different tasks go out on various intervals.
Right now it's in an access.mdb file. If a user registers and completes a form we want to remind them that in X more days they need to complete another form. I know how to send the email and all that. What I don't understand is what mechanism you use to track time on a per row basis. Meaning row 136 was entered on February 12th, 7 days later something (what would be a good something) sees that and sends a reminder.
Suggestions? Ideas?
|
|
|
|
|
Ideally, you would write a Windows service to sit in the background and regularly check to see if any notifications need to be sent out.
If it were SQL Server, you could set up a Job to run at regular intervals.
However, if you're absolutely stuck, and out of options, and if the Web site receives a fair amount of evenly dispersed (time-wise) traffic, you can rely on the usage patterns to check for pending notifications. Not a great solution, and if traffic ever falls off, your notifications won't get sent out when they need to be.
I suppose you could also expose a public Web service, and then have an external app "ping" that Web service to tell the server to check for and send notifications.
|
|
|
|
|
Yeah, I was just going to write an .exe and run it at scheduled intervals using the Task Scheduling service. But those are all great ideas. If it is SQL Server (which it might be in production) do you have a link to more information?
|
|
|
|
|
I don't have a good one off hand, but look up SQL Server Jobs.
Sorry I didn't respond sooner. I was at a "lamaze" class all day (they don't call it that nowadays), then had dinner with the in-laws.
|
|
|
|
|
I had a similar requirement once, designed it with a windows service periodically checking a table for new records (SQL Server 2000)and sending Emails. But if you are using SQL Server 2005, you may be interested in looking at Notification Services[^] a built in feature.
|
|
|
|
|
Hi all,
I am getting a strange problem when i try to attach a file with a mail message.
Here`s the code..
MailMessage msg=new MailMessage();
msg.To=emailaddr;
msg.From=Fromemp;
msg.Subject="Hello " ;
string attachedFile = UploadCV_File.PostedFile.FileName;
MailAttachment ma=new MailAttachment(attachedFile);
msg.Attachments.Add(ma);
SmtpMail.SmtpServer="localhost";
SmtpMail.Send(msg);
The problem is that it gives an error when i select a file path which is long ie C:\Documents and Settings\Administrator\Desktop\New.txt and doesn`t gives an error if the path is short ie C:\New.txt.
What`s the problem????Help!!! Thanks in advance
|
|
|
|
|
The spaces are what's killing you. Try replacing the spaces with the ascii equivalent.
|
|
|
|
|
Sorry!!!, but replacing spaces with ascii code also doesn`t work .Here is what i did...
MailMessage msg=new MailMessage();
string filename=File1.PostedFile.FileName;
filename.Replace(" "," ");
attachment=new MailAttachment(filename);
msg.To=To_usr.Text;
msg.From=From_usr.Text;
msg.Body=TextBody.Text;
msg.Attachments.Add(attachment);
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
SmtpMail.Send(msg);
Is this approach right?? What should i do now?
|
|
|
|
|
Well, if it's working then it's right. If not...
Try doing a Response.Write(File1.PostedFile.Filename);
See what it's actually getting. Response.Write should output it to the very top of your web page. You can also use System.Diagnostics and then do a Debug.Write(File1.PostedFile.FileName);
|
|
|
|
|
Well i did Response.write but it still shows spaces and hence gives invalid attachment error.I can`t use the alternative of copying the file on server and then attaching it to the mail message.
|
|
|
|
|
Have you given appropriate permissions to ASP to do this? You need to give IIS IUSR and IIS IWPD the correct permissions so they can write files to the server.
Oops, never mind. I was thinking we were uploading to the server...
Have you let someone else test your site from another PC to see if the have the problem?
|
|
|
|
|
The app is still under construction and hasn`t been uploaded on a server.It`s still on my PC.
|
|
|
|
|
It may sound silly, but try preceding your file path string with the @ symbol... ascii should work too.
Nila
|
|
|
|
|
How to write coding for treeview.There is no treeview control in Toolbox. i saw many article for treeview but i didn't get.pl send me coding for treeview
Thank you
|
|
|
|
|
treeView control is in .net 2005 .
have you .net 2.0 or not
|
|
|
|
|
If you are using 2005,Its in the Toolbox under Navigation
|
|
|
|
|
fill the sitemap with nodes and choose the sitemap datasource for the tree view
Best Regards
3ala2
|
|
|
|
|
Hello Everyone,
I am creating one application in ASP .Net that is creating Excel template based on the details captured from database.
Now, my working criteria is that i am working on veritual directory say, VD1. Now, one of the subdirectories contains Excel Template from which new template is to be generated and displayed in the client browser.
As part of the requirement, newly generated template is to be placed in the directory which is physically placed anywhere on the Hard Disk but is registered as a virtual directory, say, VD2.
Now, the question is that, can i access the physical path of the virtual directory VD2 from one of the pages of directory VD1?
I tried with Server.MapPath method call, but it didn't worked out as it returns physical path in context to directory VD1 only.
Can anybody help me out in this area?
Regards,
Umesh.
|
|
|
|