|
could be because if there is no user that matches the username there won't be any data at Table.Rows[0].ItemArray[0]....well that seems the most likely anyways.
|
|
|
|
|
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
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: Cannot create/shadow copy 'Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' when that file already exists.
Source Error:
Line 121: <roleManager defaultProvider="DefaultRoleProvider" enabled="true">
Line 122: <providers>
Line 123: <add name="DefaultRoleProvider" type="EnPointe.SOOnWeb.Utilities.Security.SOWRoleProvider" />
Line 124: </providers>
Line 125: </roleManager>
Source File: C:\Projects\SalesIntranet\WebInterface\web.config Line: 123
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Utilities' could not be loaded.
=== Pre-bind state information ===
LOG: User = PK-NAVAIDA\ASPNET
LOG: DisplayName = Utilities
(Partial)
LOG: Appbase = file:///C:/Projects/SalesIntranet/WebInterface/
LOG: Initial PrivatePath = C:\Projects\SalesIntranet\WebInterface\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Projects\SalesIntranet\WebInterface\web.config
LOG: Using host configuration file: C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/9a43166b/396af647/Utilities.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/9a43166b/396af647/Utilities/Utilities.DLL.
LOG: Attempting download of new URL file:///C:/Projects/SalesIntranet/WebInterface/bin/Utilities.DLL.
LOG: Using application configuration file: C:\Projects\SalesIntranet\WebInterface\web.config
LOG: Using host configuration file: C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
ERR: Failed to complete setup of assembly (hr = 0x800700b7). Probing terminated.
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727
WHAT IS THIS STUPID ERROR, PLEASE HELP ME TO GET RID OF THIS PROBLEM>
|
|
|
|
|
Don't double post.
The file is in use. Reboot.
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 )
|
|
|
|
|
hi,
thanks for your reply but sorry to say that this is not solution to my problem. also i have critical problem for that issue, kindly if you have any solution to my problem, i shall be greatful to you all.
Neo
|
|
|
|
|
Hi, I've read that usually if one wants to display binary data from a data store one has to read it using the ExecuteScalar() method of the SqlCommand class. Then caste the object the method returns by putting it in a byte array and display it like the following.
Response.ContentType = "application/pdf"<br />
<br />
Response.BinaryWrite(buffer);
How do I set the Mime Type of the file retrieved from the database dynamically? What I have in mind is this, suppose I have 3 fields in my database table with their data stored like the following:
ResumeID Int Resumes Blob ResumeTypes Varchar(50)
1 Something "application/doc"
2 Another Something "image/img"
I then get the value of the ResumeTypes field of my database and place it in the code like this
Response.ContentType = "Value of ResumeTypes"
How do I go about doing that? Thank you in advance for your help.
-- modified at 21:28 Monday 30th July, 2007
|
|
|
|
|
You'd do it exactly like this, store the mime type and pull it out of the DB.
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 )
|
|
|
|
|
Hi Christian, the problem is I'm unsure about how to retrieve the info from the database. I have already written code to connect to a database and retrieve data but its for a different purpose. The following is the modified code to try to make the program dynamically set the mime type.
For i = 0 To ListBox1.Items.Count - 1
If ListBox1.Items(i).Selected Then
DBCommand = New OdbcCommand("SELECT DocID, Document, DocTypes From ArchiveTB where Authors = '" & ListBox1.Items(i).Text & "'", DBConn)
End If
Next
If Not IsNothing(DBConn) Then
DBConn.Open()
DBCommand.Connection = DBConn
Dim DS As New DataSet
Dim AD As New OdbcDataAdapter(DBCommand)
AD.Fill(DS, "ArchiveTB")
AD.Dispose()
Me.ListBox2.DataSource = DS
Me.ListBox2.DataTextField = "DocType"
Me.ListBox2.DataValueField = "DocID"
ListBox2.DataBind()
Dim buffer As Byte() = New Byte(contentLength - 1) {}
reader.GetBytes(0, 0, buffer, 0, contentLength)
Response.ContentType = "" & ListBox2.SelectedItem.Text & ""
Response.BinaryWrite(buffer)
End If
Please take a look and see if I can do it this way. However, I don't want to force the user to choose the the mime type, how can I do this without using a list box? Thanks again for your help.
-- modified at 3:20 Tuesday 31st July, 2007
|
|
|
|
|
To reiterate advice I've given you many times before
1 - use real variable names, not listbox1
2 - don't grab text from a control to create SQL, it can be used for injection attacks
3 - don't iterate over a collection looking for the item that is selected, when the listbox has a selecteditem property
I despair that we are discussing the same function, week after week, but you don't actually take the advice given to you.
ASPnoob wrote: Response.ContentType = "" & CurrentModels.SelectedItem.Text & ""
Why are you grabbing the mime type from the CurrentModels control, and where does the buffer variable come from ? What does this have to do wtih ListBox2, anything ?
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 )
|
|
|
|
|
I am facing one typical problem, that is I have to just create update panels dynamically have server side controls in their content template, which is done through clicking the button which is in another
update panel whose update mode is set to conditional, this is bcoz when the user click to add controls and fill them with values and then again click to generate more controls , the previously generated controls loses its values, so i put the button that generate controls dynamically in another update panel and set its update mode to conditional, now when i click on to add controls nothin happens , but when i took button to outside panel it adds but page postback , i want to add controls using partial postback and when i click add button it will not cause the previously dynamically generated controls to lost their values.
|
|
|
|
|
Hello All
I have a custom web control i am finishing, and have run into an issue that has caused problems for me in the past.
That problem being that when said button is clicked, the page state (ViewState) is only changed after the second click.
These are programmatically created buttons.
This appears to be some weird postback issue, but I am about out of ideas here.
Last time I ran into this, I simply forced a full-page reload, and that was enough. As this is part of a control, that hack is not an option.
Can someone please enlighten me as to how a control as "simple" as a button can "just" do what it is supposed to on the FIRST click?
--stoland
-- modified at 17:28 Monday 30th July, 2007
|
|
|
|
|
Usually this means that your code is setting the viewstate at the wrong point in the page lifecycle. The order is page_load, events, page_prerender. Set some breakpoints and walk through your code to see the sequence of events, and you'll work out where your bug is. The button, I guarentee you, is working fine.
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 )
|
|
|
|
|
I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in.
Thanks,
Nate Lindley
|
|
|
|
|
yes, it is easy to achieve but what you have to do is to built the table (add rows and colums) dynamically at runtime in the table...
e.g in code-behind file (default.vb) use
if condition=true then
//add code to create table with 3 rows and 5 colums
elseif condition2 =true then
// add code to create table with 2 rows and 2 colums
elseif condition3 = true then
and so on......hope it helps
Note: at Design time you should just place the Table control on the place where it needs to drawn at runtime... then handle, height, width, and etc attributes programtically in code behind file
:- Rashid Ali -:
|
|
|
|
|
Hey Rashad,
Yea I could do that to create a data table, but I just want an HTML table. Basically the situation is that I'm going to have a page with 5 tables on it (one on top of the other). Each table has multiple rows (one for each PDF for that state), and I want to set the Visibility attribute (style) of each one.
Thanks,
Nate
|
|
|
|
|
i think u can achieve the same task using Server Table Control, why you want to use html table only?
:- Rashid Ali -:
|
|
|
|
|
Thanks for the quick responses rashad! Basically these tables are just one column tables with multiple rows that contain links to PDF files. I know I could just use one table and set the links for that table, but I'd rather have 5 separate tables and have their Visibility properties changed based on the login.
Thanks,
Nate
|
|
|
|
|
Of course.
objHTMLTbl.Visible = false
I didn't get any requirements for the signature
|
|
|
|
|
Hey Todd,
Thanks for the answer. But, it is an HTML table, thus not having a Visible attribute (has visibility) and as far as I know you cant set the attributes of an HTML table by using the ID (that would def be the easiest way tho).
Thanks,
Nate Lindley
|
|
|
|
|
In one of .aspx page of my application HTML Compnent is used. I need to get object of one of HTML control mentioned in HTML Component. But there is no public method or property declared in HTML Component which is returning any of HTML Control. We are also not allowed to modify code in HTML Component.
So, in this scenario how can we get the object of HTML control mentioned in HTML Component?
Thanks,
Satindra
Myself Satindra working on .NET Technology for last four years.
|
|
|
|
|
Does the HTML Component have a FindControl Method?
I didn't get any requirements for the signature
|
|
|
|
|
No such method is there. Actually there is no method or property in HTML componenet which returns object of any HTML control mentioned in HTML Component.
|
|
|
|
|
I developed a web application, which has two sections
Client Section: that is visible to local users
Control Panel: allows admin of the site to control the contents of the web application.
I created a cpanel folder on the root of the web application, and all the pages and functionality of Control Panel section goes there. The sample structure of the files is as in below section:
/Default.aspx 'Client Side File
/contactUs.aspx 'Client Side File
/Aboutus.aspx 'Client Side File
/Web.config 'Main Configuration file ( admin section uses connectionstring from
'the same web.config file
/AppCode/DAL/Classes.vb ' Contains all the classes used in both client and cpanel section
/CPanel/Default.aspx ' Admin side File
/Cpanel/UpdateContactus.aspx ' Admin Side File
/Cpanel/UpdateAboutus.aspx ' Admin Side File
Now problem is that, i need to Secure Pages in CPANEL by adding Authenticating process, now if i add the authentication information in
/Web.Config /Main configuration file
then it will apply on both client side and Cpanel side as well... but i need this authentication only in CPanel side, so what i did is add a new configuration file with appropriate instructions and a Login Page, where person trying to open CPanel will be redirected if he/she has not logged in using proper username and password.
here i added those files at place
/CPanel/Web.Config
/CPanel/Login.aspx
but when i try to open any page, it gives me an error message
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
---- The code for Web.config -----
<configuration>
<appsettings>
<connectionstrings>
<system.web>
<authentication mode="Forms ">
<forms loginurl="Login.aspx" name="realestate" path="/" protection="All" timeout="30">
<credentials>
<user name="myuser" password="abc">
Any Solution?
1- Can we merge two different projects with different web.config files with each others?
:- Rashid Ali -:
|
|
|
|
|
If someone fills in first name on page1.aspx and i want that to appear on page2.aspx, how do i do that? lets say the element name for both of them is fname.
Thanks in advance
|
|
|
|
|
Well, you could do a cross page postback:
Page.PreviousPage.FindControl("txtName");
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Cross page postback is one way, storing information in the session is another, passing it on the URL is another ( this is not safe ), another is to pass an Id on the URL and use it to get the information out of hte database, if it's previously been stored there.
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 )
|
|
|
|