|
I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?
|
|
|
|
|
|
Yes ip address or DataSource name given by your Service Provider is written in web.config and the "Key" will be used inyour code to call that connection string.
eg.
add key="xyz" value="server=209.xxx.xxx.xxx;user id=xyz;password=xyz;database=xyz"
|
|
|
|
|
IP address is fine, if you use a name, it needs to be resolved anyhow.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
You have to give the ip address or server name provided by your service provider in the connection string...,with out this you can not establish the connection to the server
|
|
|
|
|
|
Subin Alex wrote: Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?
This is depends where you DB server is. Your friend use IP Address of Web server as DB server, because of they have hosted Database and Web Sites in a Same System.
Subin Alex wrote: is it a gud practise or there is any other way?
It depends on requirements and application. If its very small application then its fine. for large organization they always keeps it different.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I have used AJAX ModalPopup Extender in my site but there is a design issue that the Popup window appears on the left top corner and it is only partially visible in Internet Explorer but it is fine in Mozilla.
In mozilla it is in center.
And I need compatibilty for both browsers.
Can somebody help me out what is the exact problem is???
|
|
|
|
|
Hard to say without seeing code, but if it doesn't work in IE, then I assume that you're doing something wrong.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi Christian,
When i am setting dispaly style of my popup panel as
asp Panel ID="PnlTmpPart" runat="server" Width="600px"
style="vertical-align: middle; text-align: center; margin-top: 600px; margin-left: 1000px;" Height="450px"
then it is appearing properly in Internet Explorer but then it is disturbed in Mozzila.
So i think it is typical design issue.
Hope now you get my problem
|
|
|
|
|
OK, sounds like you just need to work out how to get your HTML right. You know you can write code that runs differently based on the host browser ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Ya but i have to search as i havnt used it in this project
can u hav that code right now.
Plz send it to me
Thanks alot.
|
|
|
|
|
i have included mail delivery code in my project. the problem is that,its sending mails to gmail account successfully without delay.But is unable to send mails to other mail accounts like yahoo,in etc.
How can i solve that.
|
|
|
|
|
deepthy.p.m wrote: How can i solve that.
Have you looked at the bulk/spam folders? Yahoo might have marked the message as spam.
|
|
|
|
|
but in in.com i didn't get that mail.but in yahoo.com its in the span .How can i send directly to inbox in all accounts.
|
|
|
|
|
deepthy.p.m wrote: its in the span
span?
deepthy.p.m wrote: How can i send directly to inbox in all accounts.
Show us the code you are using for sending mail.
|
|
|
|
|
You can't control how a mail provider decides what is spam, if you could, it would be pointless. Whenever the mail is not arriving, you have an issue with your settings and the mail provider, not an ASP.NET question.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
Credentials of which mail server you are providing i.e. which smtp server you are using for sending mail???
I think it is gmail.
|
|
|
|
|
i use localhost mail server
SmtpMail.SmtpServer = "localhost";
|
|
|
|
|
Actually what we do in such conditions while making some mail sending code. We provide the credentials of our mailserver and then through a mail id of our domain we can send mail to any server whether it is gmail or yahoo.
Just while sending your mail code apply break and catch the exception. You will see that most probably these mails were rejected by the servers on which you are sending the mail.
Which port and emailid you have provided in your code.
|
|
|
|
|
This is because most mail accounts like yahoo, msn ect.. have numerous checks like reverse dns to ensure that the emails being sent to them are coming from a fully qualified domain name. If your local computer doesn't have a fully qualified domain name and does not have a reverse dns setup then you may need to send your mail from a remote email server that has that criteria.
Hope this helps.
|
|
|
|
|
i'm trying to restrict one user to be logged in only once .if he tries to log in to the system using his same username while logged in i want to restrict it , i use the session , and trying to catch if the user is already logged in by setting
this.session[user.usrname]=user.usrname;
but when i try to log in system by using the same username it doesn't give any exception. the session mode is InProc .
|
|
|
|
|
I don't see the code where you try to catch that the user is already logged in, only where you set it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
You can use Database in this scenarios. When user logged in first time, enter the user id/ user name into the database. And this database should be checked every time when any user logging into the system, if the user id is already there, give a message that 'some one is already logged in with same credentials'.
Note : you have to clear the database entries when user log off the system,close the browser etc.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
tanx for your kind reply, now i want to clear whether i'm having a correct idea about the session.
when a user logged on to the system i'm trying to keep it in the session.what i want to know is whether the server keeps a collection of session objects to keep the information related to the logged on users.
and in the previous code session gets a key and a value, so when we set the same key it should give an exception like hash table, isn't it
|
|
|
|