|
The windows account from which you logged in and/or aspnet account do not have enough permissions
That may be the cause
Try giving permissions to those account
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
did u try it by reinstalling the IIS ????
if u reinstall then please Reinstall framework also after the installation of IIS
Thanks !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
I have two projects in a solution. One of the project is a web application and the other is a web setup project for packaging the web application for deployment. In the web setup project I have added a .bak file that is deployed together with the web application. Can someone explain why when I attempt to build the web setup project, MSSQLServer starts installing?
|
|
|
|
|
Hi,
I have made one web application using Asp dot net 2005 and sql server 2005.The sql server i am connecting is the remote sql server..When i run my application in my computer and in LAN, it worked without any error..I run it after publishing it and even making virtual directory..It worked fairly...But when i upload the application to the remote machine.e i uploaded my application(published application including virtual directory) and try to run my application from the remote server.But when i try to run it, it gives configuration error like below:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Why this error comes ??Shall i have to do anything in configuration file ..????In the above error, it is saying Virtual directory not being configured..But i did create virtual directory and run it in LAN..It's working but when trying to run it from remote computer(through ftp), its not working...How can i get out of it ??
suchitamanandhar@hotmail.com
|
|
|
|
|
The error is that the folder where the application is published is not an application. Either a regular folder or a virtual directory can be an application, but neither is an application by default.
Making it an application is easy. Just open the properties for the folder and click "Create".
---
single minded; short sighted; long gone;
|
|
|
|
|
i didn't get you ..
suchitamanandhar@hotmail.com
|
|
|
|
|
What didn't you get?
---
single minded; short sighted; long gone;
|
|
|
|
|
I didn't get the things you said that Either a regular folder or a virtual directory can be an application, but neither is an application by default....
suchitamanandhar@hotmail.com
|
|
|
|
|
change the custom error mode in your web.config file and then see the actual error.
K Nitin
|
|
|
|
|
hello,
Ya, i have initally changed custom error mode to "Off"..So, do i have to change something else there by something....
suchitamanandhar@hotmail.com
|
|
|
|
|
Hai
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound" EnableViewState="false" ><br />
<HeaderTemplate><br />
<asp:LinkButton ID="lnkID" runat="server" EnableViewState="true" CommandName="Sort" CommandArgument="ID" OnCommand="LnkButton_Command" >LinkButton </asp:LinkButton><br />
<br />
<asp:LinkButton ID="lnkNmae" runat="server" EnableViewState="true" CausesValidation="true" CommandName="Sort" CommandArgument="Name" OnCommand="LnkButton_Command" >LinkButton</asp:LinkButton><br />
<br /><br />
</HeaderTemplate><br />
<ItemTemplate><br />
<%# Eval("ID") %> <%# Eval("ID") %><br />
</ItemTemplate><br />
<SeparatorTemplate><br />
<br /><br />
</SeparatorTemplate><br />
</asp:Repeater><br />
protected void LnkButton_Command(object sender, CommandEventArgs e)<br />
{<br />
<br />
Response.Write(e.CommandName);<br />
Response.Write("<BR>");<br />
Response.Write(e.CommandArgument);<br />
}
With this code i am creating a Sort facility in a repeator control for which i have added a in the header template and map the functionality to the header.
<asp:LinkButton ID="lnkNmae" runat="server" EnableViewState="true" CausesValidation="true" CommandName="Sort" CommandArgument="Name" OnCommand="LnkButton_Command" >LinkButton</asp:LinkButton>
Everything works cool up to this step.When i disabled the viewstate of Repeater 'LnkButton_Command' event is not fring. Is there any way todisable the parentcontrol view state and enable child view state.
|
|
|
|
|
One option is to replace the link buttons with links that place the sort order on the URL. This requires no viewstate. It also makes the page bookmarkable with a sort order.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your valuable suggestion.
The problem is if passing it as a querysting the whole data in the page needs to be reloaded. I only need to rebind the repetor. Is there any other way to do. i am really stucked here.
Thanks in advance
|
|
|
|
|
rebinding it surely means reloading the data ?
I don't thnk there's a way around it, you hae to turn viewstate back on.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your Help Graus.
Seems i must turn on ViewState for repetor. Is there any way i can turn off ItemTemplate and AlternateItemTemplate viewstate.
I am using Eval method to bind data
<td align="center" valign="middle" class="grid001"><br />
<%# Eval("CreatedDate", "{0:MM/dd/yyyy}")%><br />
</td>
Thanks in Advance
|
|
|
|
|
Hello Everyone,
I've stored the images in my database and now i want to display those images in my web page and i'm using the code given below for displaying it.....
But the compiler throwing an error
Invalid Parameter at Bitmap bitmap =new Bitmap(stream) line
plz try to understand my code and suggest me some way to come out of this.......
MemoryStream stream = new MemoryStream ();
SqlConnection connection = new SqlConnection (@"server=.;database=kiritbhai;uid=sa;pwd=");
try
{
connection.Open ();
SqlCommand command = new SqlCommand ("Select ImageFile from Rough_Images", connection);
byte[] image = (byte[]) command.ExecuteScalar ();
stream.Write (image, 0, image.Length);
Bitmap bitmap= new Bitmap (stream);
Response.ContentType = "image/gif";
bitmap.Save (Response.OutputStream, ImageFormat.Gif);
}
finally
{
connection.Close ();
stream.Close ();
}
|
|
|
|
|
The Knowledge wrote: But the compiler throwing an error
Invalid Parameter at Bitmap bitmap =new Bitmap(stream) line
That means that your data isn't really a bitmap.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ok Here i'm sending my code for storing the images in the database
And also there are records in database which holds Images as <binary> and ImageType as image/gif
Plz sir have a look at my code suggest me the way................
Stream img_strm = uploadFile.PostedFile .InputStream ;
//Retrieving the length of the file to upload
int img_len=uploadFile.PostedFile .ContentLength ;
//retrieving the type of the file to upload
string strtype=uploadFile.PostedFile.ContentType.ToString ();
string strname=txtFileName.Text;
byte[] imgdata= new byte[img_len];
int n= img_strm.Read(imgdata,0,img_len);
//int result=SaveToDB(strname,imgdata,strtype);
DataUtility dUT=new DataUtility();
string strsql="Insert Into Rough_Images(ImageName,ImageFile,ImageType) Values('"+strname.ToString()+"','"+imgdata.ToString()+"','"+strtype.ToString()+"') ";
int result=dUT.ExecuteSql(strsql);
if(result>0)
{
Response.Write("Images Saved Successfully");
}
|
|
|
|
|
I'm not sure how calling tostring on a byte array will work, I'd expect it to null terminate when it finds a couple of 0s. This is one good reason not to use dynamic SQL like this, use a parameterised query or a stored proc.
You can check, by checking the length of the entry against the length of the array you started with.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
when i am tryibg to attach my database its showing the following error..
"An error occurred when attaching the database(s). Click the hyperlink in the Message column for details."
can any body guide me how to solve this !!!!!!!!!
|
|
|
|
|
bhattiprolu wrote: "An error occurred when attaching the database(s). Click the hyperlink in the Message column for details."
what is the details?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
these are the details its providing...
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
Attach database failed for Server 'Server Name'. (Microsoft.SqlServer.Express.Smo)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Unable to open the physical file "D:\mohan.bhattiprolu\Documents\Visual Studio 2005\WebSites\Prototype\App_Data\tempdb.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
|
|
|
|
|
You need to give the ASPNET user access to the file, in the file system.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
can you explain me in detail..
|
|
|
|
|
Right click on the file in the file system. Choose properties. Go to the security tab. If you don't have one, then your general file system probably has the simple security option set, you need to find that and remove it.
Now, click Add. Type ASPNET in the text box and click 'check names'. It should find it. Click OK. Now check 'full control'. Click OK.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|