asp.net-3.5

Why do I get an exception in IE but not Chrome when running my ASP.NET site?

不问归期 提交于 2019-12-12 04:30:53
问题 I was finally able to get a legacy site to run, in my regular/preferred browser - Chrome. I was trying to see how to step through the javascript code there in the F12 tools. When I couldn't see how to access the script code, I did some research, and found that javascript debugging of ASP.NET projects can (supposedly?) only be done in IE. So in the project, I switched the browser to use from Chrome to IE. Now when I try to open the site from the VS IDE, it breaks with an exception: Why would

Exception has been thrown by the target of an invocation - InvalidCastException in App_Code.dll

本小妞迷上赌 提交于 2019-12-12 03:16:22
问题 I have an asp.net application in which I am receiving the following error message: - Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Stack Trace: at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig,

Get TextBox value from GridView cell

此生再无相见时 提交于 2019-12-12 02:57:14
问题 I have a GridView containing template fields. Each template field contains a TextBox. Last column of the GridView contains SELECT command field. On click of SELECT, I want to get the value of TextBox located in a cell of the selected row. I tried: ((TextBox)GridView1.Rows(e.Row.RowIndex).FindControl("TextBox1")).Text; in Row_Updating event but it is not working. I tried a similar variant of code in SelectedIndexChanged event of GridView but it gives error: Object Reference not set to an

Folder permission on server while uploading?

社会主义新天地 提交于 2019-12-12 02:45:17
问题 I want to upload files in my Asp.net application on server but I have to grant it R/W access so that I or anyone can upload files in it. Is there any way that I write some code or configuration lines in Web.config which solve this permission problem? 回答1: You have to set the permissions on the folder for the account under which your application is running. This is an operating system level, and hence nothing can be done about it in Web.config. Be careful to only set the permissions on the one

Create MIME Mail with attachment for AWS SES c#

﹥>﹥吖頭↗ 提交于 2019-12-12 02:31:57
问题 I am trying to send an AWS SES mail with attachment using SDK. I found working code here: it refers MimeKitLite but this we can not refer in .net framework 3.5. Is there any workaround I can write in my code to send the mail using framework 3.5? due to some dependencies we cannot upgrade our project framework. I am writing here my working code (framework 4) for reference: protected void Page_Load(object sender, EventArgs e) { var message = (MimeMessage)MyMailMessage(); var stream = new

Unable to upload files which are 4MB or more

陌路散爱 提交于 2019-12-12 01:38:13
问题 I am trying to upload a file using my website. Everything works file until the file which I am trying to upload is 4MB or more. I have checked the IIS7.5 settings, and it seems to be set to 30MB upload size. I am using FCKEditor to upload the files. Does FCKEditor have a file upload limit? If yes, how do I change it? If no, why can't I upload files which are 4MB or more? 回答1: Increase The default is 4096 (= 4 MB) maxRequestLength to 1 GB in web.config & 60000 seconds or whatever time you

How to AspxMenu fill from xml file

狂风中的少年 提交于 2019-12-12 01:30:04
问题 On my page I have two AspxMenu.Click on Master Menu correspondent value will show on Child menu XML syntax: <Demo> <ClientCompanyId CompanyId="1"> <MyMenu> <module Text="Basic Settings" ModID="Mod1" ModuleID="1" MenuType="0" Perm="False"> <menu Text="Forms" MID="1-1" ParentID="Mod1" MenuDescription="Mod" ModuleID="1" MenuType="0" Perm="False"> <Leaf Text="LookUp" MID="1-3" ParentID="1" MenuDescription="" ModuleID="1" MenuType="0" Perm="False" LeafNode="true" TargetUrl="" ModuleMenuID="1-3"> <

Sorting TList<object> (ntiers) with ThenBy

守給你的承諾、 提交于 2019-12-12 00:33:31
问题 We are using nTiers and I have this list of objects that i need to sort by a property but then by another property,i have the following but i cant figure out how to to the ThenBy , I have seen examples with List<object> but not with TList<object> . TList<Client> clients = service.GetClientsById(cid); clients.Sort("ClientOrder"); but then i need to sort it by the ClientName . I saw an example in another post using LINQ, but i cant get this to work like that (example below),which would allow me

Facebook Toolkit 2.0 - Error when running it on a server with asp.net 2.0 installed

霸气de小男生 提交于 2019-12-11 17:23:30
问题 I'm getting the following error when trying to run the Facebook Connect toolkit on a server with ASP.Net 2.0 installed - I manually moved over System.Core and System.xml.Linq to the server from the 3.5 DLLs. Most other things seem to run, until I try to access the "users" object - more specifically, the getinfo() method. This is the error - anyone have any ideas? Thanks! Method not found: 'Void System.Xml.XmlReaderSettings.set_MaxCharactersFromEntities(Int64)'. [MissingMethodException: Method

Using Linq to Entities 3.5 to select null columns

强颜欢笑 提交于 2019-12-11 15:08:11
问题 I am using Entity Framework 3.5 . My model has a Mediator table and a MediatorAvailabilities table. Most Mediators do not have an entry in MediatorAvailabilities (Availability = Null) but I still need to bring back the mediator whether or not there is a related MediatorAvailabilities. My query below is only bring back a mediator if there is a related Availability. Again how do I get mediators even if Availability = null?: Dim mediators = (From m In entity.Mediators.Include(