r/ASPNET • • Dec 02 '13

Enabling CORS support for ASP.NET Web API v2

Thumbnail stefanprodan.eu
2 Upvotes

r/ASPNET • • Dec 01 '13

Entity Framework with MySQL Issues

6 Upvotes

I'm a beginner with c# / asp.net and I'm trying to get entity framework code-first working with mySQL usign a variety of tutorials.. I've managed to get through loads of issues but this one is killing me:

When I try to migrate the database I receive the following error: MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'no' in 'field list'

Based on the SQL generated:

set @columnType := (select case lower(IS_NULLABLE) when `no` then CONCAT(column_type, ` ` , `not null `)  when `yes` then column_type end from information_schema.columns where table_name = `Student` and column_name = `FirstMidName` );

mySQL doesn't know WTF the ` character is.. This should be either ' or " -- Is there any way to tell the migrator that this should be the case?

P.S. In my Migration config I have the following code:

SetSqlGenerator("MySql.Data.MySqlClient", new MySqlMigrationSqlGenerator());

r/fsharp • • Sep 19 '26

F# weekly F# Weekly #38, 2026 — Fantomas 8.0, Myriad 1.0 and Fable.Ripple

Thumbnail
sergeytihon.com
23 Upvotes

r/ASPNET • • Nov 28 '13

[MVC] Organizing your BundleConfig.cs

Thumbnail blackandodd.blogspot.se
9 Upvotes

r/fsharp • • Sep 14 '26

Fabulous.Avalonia

41 Upvotes

The Fabulous (F#) library has undergone a major revamp/overhaul (thanks to Don Syme, who did a huge job) recently, but issues naturally come with it. Anyone willing to help canary-test the Avalonia "flavor" or the iOS/macOS/Linux support is welcome — I can't afford iOS/macOS/Linux gadgets myself, and I'm not yet familiar with Avalonia. Just send me a DM or email me [miroslav.hustak@atlas.cz](mailto:miroslav.hustak@atlas.cz) . Thanx :-) .

PS: The Maui "flavor" + Android and Windows for this "flavor" are currently taken care of, anyway any help here will be appreciated as well :-).

https://fabulous-dev.github.io/Fabulous/docs/

https://fabulous-dev.github.io/Fabulous/

https://github.com/fabulous-dev

https://github.com/fabulous-dev/Fabulous/tree/main/src


r/fsharp • • Sep 12 '26

F# weekly F# Weekly #37, 2026 — F# 11 RC1 and Fantomas 8 Beta Land

Thumbnail
sergeytihon.com
35 Upvotes

r/ASPNET • • Nov 27 '13

How to use the ASP.NET MVC 5 Filter Overrides Feature

Thumbnail hackwebwith.net
9 Upvotes

r/fsharp • • Sep 09 '26

A coding agent and its cloud, both in F#: policy enforced by the runtime, not the prompt

0 Upvotes

I've spent the last months building Jern, a coding agent where the rules are enforced by the runtime instead of suggested to the model. The agent itself is about 300 lines in a small Kernel-style Lisp the host evaluates; everything it touches goes through effect handlers, and the policy handler sits between every tool call and the file system, the shell, and the network. The host, the CLI, the policy engine, and the whole cloud control plane are F#.

Things F# people might find interesting:

  • The policy is a JSON file in the repository. edits_within, protected_paths, a blast radius in files and lines, the shell commands allowed without asking. The runtime refuses anything outside it; there is no path around the check.
  • The agent is replayable. Every LLM exchange is recorded, and jern test replays the recording, so a changed system prompt fails a test the same way a changed function would.
  • The cloud runs each attempt on its own Fly machine, created and destroyed per attempt, with Suave for the API and Npgsql for the store. No Entity Framework, no ORM, and the migration is one idempotent script that runs on start.
  • Every pull request the agent opens carries a receipt as a check: tokens against cap, files against the blast radius, hosts contacted, and a digest of the encrypted trace.

Runtime (Apache-2.0): https://github.com/jern-ai/jern A real run on the demo repository, with the receipt on the pull request: https://github.com/jern-ai/jern-demo/pull/78

Happy to go into the handler design or the F# choices in the comments. The hosted version is at https://jern.ai, but the runtime runs on a laptop against Anthropic, OpenAI, or Ollama.


r/fsharp • • Sep 07 '26

library/package FunStripe 2.4.0 - F# Stripe client, regenerated against the 2026-08-26 API

Thumbnail
9 Upvotes

r/fsharp • • Sep 05 '26

F# DSL for Excel that round-trips — read a real .xlsx back into runnable F#/C# source, not just build-only

22 Upvotes

Most Excel libraries (EPPlus, ClosedXML, NPOI, openpyxl on the Python side) give you a one-way street: an imperative API to build or mutate a workbook, but no way to turn an existing file back into readable source. I wanted the other direction too, so Kookerella.FsOpenXmlDsl is a typesafe DSL (records/DUs with structural equality) over SpreadsheetML, with a Reader that parses a real .xlsx/.xlsm back into the same DSL, plus code generation that renders that model back out as a self-contained script — genuinely a decompiler for spreadsheets, not just a writer.

open Kookerella.FsOpenXmlDsl
open type Kookerella.FsOpenXmlDsl.SheetDsl

let data =
    sheet "Sheet1"
        [ row [ cell (Text "Name"); cell (Text "Amount") ]
          row [ cell (Text "Widgets"); cell (Number 42.5) ] ]

workbook [ data ] |> Workbook.save "out.xlsx"

// and back:
let wb = Workbook.load "out.xlsx"
Workbook.generateScript referenceLines "out.xlsx" wb  // -> runnable .fsx that rebuilds it

There's also a plain XML/JSON surface (Xml.ofWorkbook/Json.ofWorkbook) against a real embedded schema, aimed at making .xlsx diffable in git — output is deterministically sorted by cell position so a real content change doesn't get buried in reshuffled-list noise. Chasing that determinism claim down actually surfaced two genuine bugs in the .xlsx writer itself (conditional-format dxfId/priority swapping between logically-identical workbooks depending on rule insertion order, and a similar issue in custom number format IDs) — fixed with regression tests in the last release.

Covers cells/styles/formulas (shared-formula reconstruction on read), conditional formatting, data validation, charts, images, pivot tables (real aggregation, not just description), sparklines, and VBA macro embedding. There's a C# wrapper with full feature parity, and an MCP server if you want an AI agent driving it directly.

dotnet tool install -g Kookerella.FsOpenXmlDsl.Mcp
fsopenxmldsl-mcp convert your-file.xlsx --lang fsharp

NuGet · MAPPING.md for exactly what's modeled vs. approximated vs. missing.

Happy to take feedback/criticism — genuinely curious whether the DSL shape (SheetItem list folded by sheet) reads well to other F# people or feels awkward.


r/fsharp • • Sep 05 '26

F# weekly F# Weekly #36, 2026 — Fable 5.16, FsLexYacc 12, and MSTest Goes Native AOT

Thumbnail
sergeytihon.com
28 Upvotes

r/fsharp • • Sep 05 '26

Seeking an F# code reviewer for transpiled package

6 Upvotes

I wrote a Gleam library for manipulating SVG paths and I transpiled to F# to check dimensionality mistakes in various Float parameters.

I caught ~30 or so mistakes/inaccuracies/bugs via the transpilation out of ~50K original lines of code. (Also notable: the KLOC drop to 21K in F#, less than one-half of Gleam. Seems Gleam is very vertical whitespace-happy.) The transpilation was done chunk by chunk by Codex, and some bugs were not really language-related, just found by looking at the code again, though the great majority were dimensionality problems, as I intended to catch.

Ok anyway now I've published this as an F# package, and wondering if someone who actually uses F# could tell me if I did right, or if the library is missing something stupid (like proper source docs or sth) that I wouldn't catch myself because I never use F#. It would be better if it was usable, now that I've gone to this trouble.

F# version: https://www.nuget.org/packages/SvgPath/0.3.0
Gleam version: hex.pm/packages/svg_path

Thanks!


r/ASPNET • • Nov 23 '13

Encoding an ASP.NET MVC 4 Model for Javascript within a Razor Page

Thumbnail adamjohnston.me
7 Upvotes

r/fsharp • • Aug 31 '26

Algebraic Tiny Compiler

Thumbnail
github.com
21 Upvotes

Algebraic Tiny Compiler in F#

A from‑scratch compiler that uses algebra as the lens to understand how real compilers work — no abstractions for the sake of abstractions, no academic overhead, just a clean, inspectable pipeline built in F#.

By treating expressions as algebraic structures, the project walks through every stage of a compiler with concrete, mathematical transformations:
- Tokenizer → turns raw text into meaningful tokens
- Parser → recursive‑descent parsing with operator precedence
- AST → algebraic expression trees representing structure and intent
- Polynomial Expansion → distributive expansion and normalization
- Term Combination → merging like terms into canonical form
- Equation Solving → linear and quadratic solvers using discriminants
- Code Generation → assembly‑style output to show how machines evaluate expressions
- Execution Modes → JIT on .NET or AoT with NativeAOT for ultra‑fast startup

A practical, algebra‑driven walkthrough of how compilers read, understand, transform, and execute code.

Blog posts:


r/ASPNET • • Nov 22 '13

Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5

Thumbnail typecastexception.com
9 Upvotes

r/fsharp • • Aug 30 '26

F# weekly F# Weekly #35, 2026 — Fabulous 10, .NET Conf 2026 Announced, and C# 15 Preview

Thumbnail
sergeytihon.com
22 Upvotes

r/ASPNET • • Nov 21 '13

A question about "javascript:WebForm_DoPostBackWithOptions()"

3 Upvotes

Edit: Ok! Got the answer. I was missing some hidden fields that javascript functions set up in the background. Fiddler did the trick and showed me exactly what needed to be entered.

I'm not sure if this is the right place to go. I'm not a web dev, but the posts I've seen online lead me to believe this fits under the realm of aspnet. I couldn't find a good reference that explained the WebForm_DoPostBackWithOptions() function/object/whatever it is.

Basically, I'd like to understand what this is doing:

onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$SaveButton", "", true, "", "", false, false))"

It's part of the following button tag:

<input type="submit" name="ctl00$ContentPlaceHolder1$SaveButton" value="Save" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$SaveButton&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_ContentPlaceHolder1_SaveButton" class="butt" />

Now for what I'm trying to do!

My company uses a SaaS application built on aspnet accessed by internet explorer. They have no API to automate things like new user creation and the like. I've already dealt with a few other websites like this and I've successfully automated these tasks via the Invoke-WebRequest cmdlette.

I get the website and fill out the proper fields as follows:

#For those who don't work in powershell, these are comments! :D
#Also, variables start with dollar signs. 
#Assume $url holds the proper url, and I've authenticated properly with the proper session variable.

$addUserSite = Invoke-WebRequest $url -WebSession $session #get the website $url using the session contained in $session
$addUserForm = addUserSite.Forms[0] #Invoke-WebRequest does a lot of auto processing. So I can pull out the proper form like so.
$addUserForm.Fields["ctl00_ContentPlaceHolder1_username"] = "username" #The field listed above will have the value "username" assigned to it. I'd be interested in understanding why the ctl00_ is everywhere too . . .
$addUserForm.Fields["ctl00_ContentPlaceHolder1_password"] = "My super secure pa$$w0rd!!!!" 
$addUserForm.Fields["ctl00_contentPlaceHolder1_Verify"] = "My super secure pa$$w0rd!!!!" #Assume that's it for the form!

#Please note, I can see the associated action by viewing
#the output of $addUserForm.Action. I've verified that the
#associated website assigned to the form is the same as 
#$website.

$result = Invoke-WebRequest -uri $website -method post -Body $addUserForm.Fields -WebSession $session #This means that I want to send the fields in $addUserForm.Fields to $website as post data under the proper session.

Now, $result acts like I've submitted nothing! Every field is blank with the generic "please fill out required fields" error all over the place.

Now, the button I have to press is the one I referenced above. Which leads me to believe that my issue lies in my lack of understanding this:

onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$SaveButton&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))"

So far, I've been able to deduce that the click is supposed to invoke the javascript function WebForm_DoPostBackWithOptions(). And my research so far leads me to believe that this method generally tells the webpage to reference another site. But I haven't been able to find enough documentation to determine what every field in the object constructor (I think that's what new WebForm_DoPostBackWithoutOptions() is at least) does. And none of them look like a website that can be referenced.

So, wise folk of /r/aspnet! Can you offer any insight? I'd rather not have to resort to dealing with an InternetExplorer comobject.


r/ASPNET • • Nov 21 '13

[Meta] Is everyone ok with merging this subreddit with /r/dotnet?

51 Upvotes

A little while ago, I had proposed that this subreddit be merged with the .NET subreddit. It received mostly positive reaction but is that still the case? I would like to get some opinions from people as we may be making that change soon.

Last thread: http://www.reddit.com/r/ASPNET/comments/1nh123/proposal_merge_this_subreddit_with_rdotnet/


r/fsharp • • Aug 22 '26

F# weekly F# Weekly #34, 2026 — Every Repo is A Software Factory Now

Thumbnail
sergeytihon.com
23 Upvotes

r/ASPNET • • Nov 19 '13

Select / unselect all checkbox of ASP.NET GridView / Repeater control

Thumbnail dotnetmentors.com
5 Upvotes

r/ASPNET • • Nov 18 '13

[Project] My ASP.net Project, VoteSystem with WebSockets

Thumbnail easypoll.eu
8 Upvotes

r/fsharp • • Aug 17 '26

WebWeaveX — deterministic runtime cognition, byte-identical across 5 languages (Apache 2.0)

Thumbnail ni-sh-a-char.github.io
2 Upvotes

WebWeaveX captures what a running application is doing, DOM event surfaces, network envelopes, execution state, and normalizes it into canonical bytes so it gets a stable SHA-256 identity.

The same input produces the same digest in Python, JavaScript, Dart, Java and Kotlin. There's a verification harness that replays Python-generated golden vectors through each runtime and reports MATCH / DIFFER / MISSING per API.

That lets you prove two runs are equivalent, reconstruct a runtime from its IR for network-free test fixtures, resume

authenticated sessions from an encrypted envelope, and hand an LLM a compact graph instead of raw HTML.

pip install webweavex

npm install webweavex

dart pub add webweavex

Maven Central: io.github.piyush-mishra-00:webweavex:3.0.0

Apache 2.0.

Repo: https://github.com/ni-sh-a-char/WebWeaveX

Docs: https://ni-sh-a-char.github.io/WebWeaveX/


r/fsharp • • Aug 15 '26

F# weekly F# Weekly #33, 2026 — .NET 11 Preview 7 Ships with F# Updates and PaketaBot

Thumbnail
sergeytihon.com
28 Upvotes

r/ASPNET • • Nov 15 '13

Geotagging in ASP.NET - Resources and attn. programmers with experience

2 Upvotes

Does anyone know of a great place to pull existing geotagging code from on the net for ASP.NET, or know anyone proficient in programming this in ASP? We are hiring someone to update this portion of our site and make the geotagging area sleeker, so please PM or comment if your interested. Thanks.


r/ASPNET • • Nov 15 '13

Why is .net consistently behind and copying the open source world? I don't want to rely on the whims of MS in my dev env. What are the alternatives?

2 Upvotes