|
Hi,
I have a asp.net web application that uses UDL files to connect to the database. I stuck into a very strange situation where application is sometimes using this UDL to make connections to the database and sometime errors out stating "Unable to load the UDL file".
I am sure what is causing this behaviour in the application. But it is apprent that the same piece of code(without modifying anything) works today and error out tomorrow and again start working by itself.
Any help in this regard would be highly appreciated.
Regards.
|
|
|
|
|
Hi,
I need to point to the folder that is outside of the root directory. For example, if my project name is SWB and it is located in SWB folder I need to point to the folder that is outside of SWB folder.
Can I use Server.MapPath for that?
Thanks!
|
|
|
|
|
You could set this folder up in IIS as a virtual directory within your website.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for reply,
Is the re any other way to do it without IIS, cause I don't have it.
|
|
|
|
|
What web server are you using to host your ASP.NET application if you're not using IIS?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I'm using Web Developer 2005, on Windows XP Media
|
|
|
|
|
asem0525 wrote: I'm using Web Developer 2005, on Windows XP Media
You are confusing a web development tool with a web server. Visual Web Developer 2005 is a web development tool that allows you to create ASP.NET website. When you come to deploy your website to a production environment, you would need to install a web server such as IIS to host your website. IIS would be the obvious choice as it is a Microsoft product and has features specifically designed for running ASP.NET websites.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
well, yes,
it is actually my school project and I don't think I'm gonna upload it to the Internet.
is there a way to point to the folder outside of the root folder on my local computer?
|
|
|
|
|
Unless you use a web server such as IIS to define an external folder as a virtual directory within your own website, I don't think you can do this.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I am beginner in ASP.Net and have following question:
I have a class and inside of this class i load some information from database.
It is very slow to connect in each instance of this class to database again.
class DataNode
{
SqlConnection DB;
public DataNode()
{
DB = new SqlConnection("connection string");
DB.Open();
}
public DataNode[] ProcessAllSubNodes()
{
DataNode subNode = new DataNode();
subNode.GetSomeDataFromDB();
}
}
I have tried following to avoid it:
1) make SqlConnection DB - static.
Problem: if many users connect simultaniosly - i get error that datareader already used somewhere else.
2) to store DB instance in HttpContext.Current.Session and reuse it each time. It has helped, but i am not sure that it is ideal way and has no bad effects.
I know about caching objects in HttpContext.Cache, but the first time (when there is no cache) it connects to database so often (because my objects are recursive), that database stops responding and i get DB connection timeout exception
So if someone knows a good pattern for my problem, please share
Thanks.
|
|
|
|
|
The rule of thumb for database access is to open the connection as late as possible and close it as soon as possible. The slowness may simply be caused by the connection to your database, say if it is located on another server.
If the data is static, i.e. doesn't change often, then caching it may be an option, depending on the amount of data.
There are an enormous amount of examples of constructing data access layers, I would suggest you try searching for one as an example.
only two letters away from being an asset
|
|
|
|
|
I have been trying to send an email from ASP.NET 2.0 application.
It worked fine when i executed the code in the localhost. I was able to send mails through the email server and also received the same.
But when i deployed the same code in ftp server I am unable to send the email.
Exception I received is:
"Failure sending mail.System.Net.WebException: Unable to connect to the remote server".
Can anyone help me out in dis.
Regards
Ramya
|
|
|
|
|
I believe the exception is self-explanatory. Check if the deployed server can actually reach the mail server you are trying to use.
only two letters away from being an asset
|
|
|
|
|
Hi Mark,
I understand ur point. But there are two things that has to be noted here.
1. I am able to send email from an asp page inside the same ftp server to mail server that i mentioned earlier, which means that ftp server and mail server are accessible.
2. I am able to access the mail server from my aspx page in localhost , which means that mail server is accessible from aspx page too.
I dont know where exactly the problem is.
|
|
|
|
|
Just because you can access the smtp server from you local host does not mean it can be accessed from from the it is deployed on.
If the asp page works, compare it to the aspx page, what is different about the mail aspect. There is obviously something different. Have you debugged on the remote server?
only two letters away from being an asset
|
|
|
|
|
After deploying it in the ftp, how is it possible to debug the code?
I dnt know the way to do it. Kindly let me know if there is any.
|
|
|
|
|
|
Fine Mark. I will try out remote debugging nd wl get bk.
Thank you for your support.
|
|
|
|
|
I need help on how to AUTORESPOND if a user send an email to me from an asp.net application
Any Vb.net code will be appreciated
|
|
|
|
|
Instead of doing it in coding,you can try out an different way.
The domain hoster while giving you the details of the mail server will also provide you with an option to send auto responder . Try using it.
Ramya
|
|
|
|
|
does anyone know any vendors that do shared ssl certificates?
thanks
|
|
|
|
|
Hi All,
I am developing one application in which I have a Grid on Product.aspx page.In a grid i have a textbox control and a button control(Add To Cart).
I have created a Menu.ascx (user control) page in which I am using Label control along with other controls.(Dragging Menu.ascx to Product.ascx)
I want to get the value of textbox shown on label of Menu.ascx.
Can any body assist me?
I am able to retain value after button click :
Convert.ToInt32((((TextBox)e.Item.FindControl("txtQuantity")).Text))
Hello There
|
|
|
|
|
if i know your mean u want to display a text at special row in your grid on a label inside a usercontrol.
create a public metod in your ascx and then pass text to it .
sepel
|
|
|
|
|
Hi,
I am mostly new to ASP.NET.
Recently i made a ASP.NET web application, and checked it on Mozilla.
Now it works perfectly on it(Mozilla).
But when i am checking it on IE or safari(Apple windows version). The interface is crap. The menu's are out of place. Some views are missing and lot more.
Do any one have an idea why its happening so...
Please help...
Need urgent updates...
Jats
|
|
|
|
|
ASP.NET sends html/css/javascript to the browser just like any web development framework.
The trick to getting a consistent layout across all browsers is to follow the standards as outlined by the w3c[^].
Its not easy and there is no easy fix but generally keeping it simple is best and checking in different browsers as you develop will highlight any problems early.
|
|
|
|