|
Always wrap your code in "Pre" tag, because it will give better readability and accessibility.
|
|
|
|
|
now I am trying to make virtual directory for asp.net 2.0 web application.
I know how to make virtual directory.
in my web project, App_Data contains database (.mdf) file.
then, I change web.config connection strings like that:
"Data Source=(local);AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True" providerName="System.Data.SqlClient"
I used auto attach connection.
But now,when I browse this application from browser, It shows error like below.
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\WebHelpDesk\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I don't know how to slove.
pls share me , giving idea how to solve.
I also checked in SQL server 2005 management.
I detached my database file in SQL server.
but it shows error like above.
|
|
|
|
|
Did you assign the correct permission to the App_Data folder for NetworkService, or what ever user is required for writes.
|
|
|
|
|
Hi,
i am not able to get where you got this problem. but another solution for this is, you can install your database in your SQL server and change your connection string to point local SQL instance and your database.
hope this will help you.
thanks
-amit.
|
|
|
|
|
I have a web forms app where I use Windows authentication and built-in authorization based on the logged on Windows user. I don;t make explicit use of session state anywhere in my application code. Therefore, my web application has zero log on or log off functionality, but the client has expressed concern that because users never actively log off, we are left with unused session objects or similar such things left lying around, affecting performance and memory.
First, is there any risk of what the client fears? Then, what housekeeping practices can I adopt to prevent this happening if it does, or to mitigate the effects?
|
|
|
|
|
|
Thanks, but neither of those links tells me what happens to sessions if I do northing with or to them.
|
|
|
|
|
The two concepts I was trying to point you toward are:
Session Timeout - If the user does not refresh or request a page within the time-out period, the session ends.
Session Abandon - If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.
From the above information, I believe we can conclude that you don't have to do anything special in your web application, the IIS server has a session timeout value default around 20 or 30 minutes after the timeout period, the inactive users will have their session ended and the IIS server will destroy the memory and resources allocated to that session.
Please correct me if I'm wrong, but that is how I understand it.
|
|
|
|
|
Yes, the links are valid, thank you, but knowing that sessions time out isn't enough in this case. I am looking for some sort of assurance that the resources used for timed out sessions are properly freed up.
|
|
|
|
|
I always had a problem with sessions timing out in 20 minutes, unless I change the value to like 2 days. I had to go into the IIS manager to change the value. I think it's part of the app pool.
Customers called and complained, they would get a phone call, and the session would timeout on them, and the program would forget who they are.
The number that the webserver assigns for sessions simply gets removed from the servers memory, and replaced with valid ones. There must be over a million session id sequences available.
You can link session proc to sql server in web.config, and the sql server will handle the sessions, freeing up memory from the web server.
|
|
|
|
|
RE: Visual Studio NOOB question - XML -
I need to find/extract XML output from a VS 2010 project. I've inherited a project from somebody who vacated it without notice. I DO NOT KNOW WHAT I'M DOING IN VS... but hsve been told by my boss that I must figure it out. My understanding is that when a VS "project" is "Run" it will generate XML output. I'M A TOTAL NOOB. How do I "open" and "run" a VS project and then find the XML output in a portable format? My second requirement is to give this XML output to another individual. Please help. Thank you!
|
|
|
|
|
You open the project by
1) opening Visual Studio
a) File -> Open -> Project/Solution
b) Navigate to the Project/Solution file
2) Find the Project or Solution file in Explorer. (They will have csproj (for C#) or sln extension)
a) Double click and let Visual Studio open
After Visual Studio starts with this project and it has been successfully built you can run it by pressing F5 or Ctrl + F5 to start without debugger.
Unless specified otherwise in the code the output will be in Bin folder under the project folder where the project files are located.
No comment
|
|
|
|
|
Thank you Mark! That was perfect noob-speak!
|
|
|
|
|
You're welcome
No comment
|
|
|
|
|
I am looking for a Expression Builder that allows users to build their build nested expression dynamically like
(A and B and (C or D))
((A or B) and (C or D))
The math expression also needs to be restoreed in the database. A,B,C,D can be the value retrieving from the database.
Question:
1. What is the best way to store the math expression in the database? using XML?
2. Is there any opensource codes can be used?
modified 29-Nov-11 14:51pm.
|
|
|
|
|
To the best of my memory, JQuery does not really do math. For math, it's just pure Javascript.
There are Jquery testers, where you can test Jquery on the web, but I've never seen a builder. JQuery is pretty simple to implement, and the expressions are pretty short in length.
To store and expressionin sql, I would imagine you just store it as a varchar.
you can use jquery AJAX to write a JSON call to a web service, that will write to the database.
|
|
|
|
|
I Want to make SQL database primary key in Format. Something like that:
Primary key
A00001
A00002
A00003
....and so on.
Currently my primary key increase like that..
1
2
3....and so on.
I already tested with GUID but it is too long, complicated number & characters.
I don't want it. i want primary key in specific format.
how I have to do it.
how I have to generate insert sql command query in C#.
how I have to increment correctly.
|
|
|
|
|
|
thank to NILesh,
thank for your provided link.
I learned already.
it is helpful.
I found Stored Procedure for generating specific primary key.
now what I want to know more is:
how i have to use this procedure from my c# project.
how I have to make increment number.
|
|
|
|
|
This is a little off topic, but what is the problem with GUIDs? Unique keys and their values are of little relevance to me, as I usually am writing a program that takes care of them. I only rarely have any need to know a specific value at all, usually while debugging or while the program is not yet complete. In any case, it's never so bad that using GUIDs or any other format would make any difference. If GUIDs are so problematic for you, this might be an indicator that you should perhaps give the way you go about developing your application another thought or two.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
Perhaps you mean something like this?
int x = 0;
string myKey = "A" + (x++).ToString("D5");
However, I would recommend (strongly) against generating a primary key outside of the database itself (such as in C#).
What type of database are you using? Microsoft SQL Server? This can be accomplished with a before-insert trigger within the database.
|
|
|
|
|
ys I am using MS SQL server 2005.
thank for all reply.
if you found any sample like I want,
pls share me.
|
|
|
|
|
|
Hi,
On each menu or sub-menu-item click,the full page ie header,content placeholder and footer are refreshing.Need help.....
Suggest some url.
I had tried placing header and footer as seperate user control.But it failed on each menu item click or sub-menu item click.
Thanks
S.Guhananth
|
|
|
|
|
To stop this you can use Iframe to open your page.
But it will effect on your application performance.
|
|
|
|